/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import {
  numDefine100,
  numDefine128,
  numDefine140,
  numDefine28,
  numDefine2,
  numDefine13,
  numDefine19,
  numDefine18,
  numDefine3,
  numDefine16,
  numDefine5,
  numDefine6,
  numDefine7,
  numDefine8,
  numDefine152,
  numDefine153,
  numDefine154,
  numDefine164,
  numDefine165,
  numDefine29,
  numDefine20,
  numDefine14,
  numDefine80,
  numDefine83,
  numDefine84,
  numDefine30,
  numDefine21,
  numDefine31,
  numDefine22,
  numDefine32,
  numDefine23,
  numDefine33,
  numDefine10,
  numDefine9,
  numDefine4,
  numDefine15,
  numDefine11,
  numDefine48,
  numDefineNeg2,
  numDefine46,
  numDefineNeg8,
  numDefine56,
  numDefine64,
  numDefine58,
  numDefine65535,
  numDefineNeg16,
  numDefine27,
  numDefine17,
  numDefine12,
  numDefine255,
  numDefineNeg24,
  numDefine54,
  numDefineNeg4,
  numDefine24,
  numDefineNeg40,
  numDefineNeg6,
  numDefineNeg12,
  numDefineNeg3,
  numDefine40,
  numDefine36,
  numDefine50,
  numDefine25,
  numDefine26,
  numDefine63,
  numDefine38,
  numDefine39,
  numDefine34,
  numDefine44,
  numDefine68,
  numDefine124,
  numDefine57,
  numDefine52,
  numDefine51,
  numDefine35,
  numDefine37,
  numDefine120,
  numDefine53,
  numDefine60,
  numDefine300,
  numDefineNeg5,
  numDefineNeg48,
  numDefineFloat05,
  numDefineNeg10,
  numDefine65534,
  numDefineNeg32,
  numDefineNeg80,
  numDefineNeg64,
  numDefine55,
  numDefineNeg56,
  numDefine127,
  numDefine126,
  numDefineNeg100,
  numDefineNeg88,
  numDefine296,
  numDefine297,
  numDefine250,
  numDefine304,
  numDefine469,
  numDefine483,
  numDefine687,
  numDefine379,
  numDefine1043,
  numDefine531,
  numDefine345,
  numDefine43341,
  numDefine53121
} from './mandreel-part1/Class/DevNumber';

import {
  zdlPv,
  mallocNew,
  uint,
  assertNew,
  free,
  updateMandreelStats,
  zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi,
  zn20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb,
  zn20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb,
  znk20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i,
  zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE,
  zn14btQuantizedBvhD2Ev
} from './commonFile';
import { commonVariable, heapClassInst } from './mandreel-part1/Class/CommonClassFile';
import {
  gAddedPairs,
  gFindPairs,
  gNumAlignedAllocs,
  gNumAlignedFree,
  gOverlappingPairs,
  gRemovePairs,
  twoEStr1118,
  twoEStr112,
  twoEStr121,
  twoEStr133,
  twoEStr18,
  twoEStr213,
  twoEStr22,
  twoEStr222,
  twoEStr234,
  twoEStr314,
  twoEStr32,
  twoEStr323,
  twoEStr335,
  twoEStr424,
  twoEStr525,
  twoEStr626,
  twoEStr727,
  ztv12btAxisSweep3,
  ztv12btDispatcher,
  ztv14btQuantizedBvh,
  ztv16btDbvtBroadphase,
  ztv18btDbvtTreeCollider,
  ztv19BroadphaseRayTester,
  ztv20BroadphaseAabbTester,
  ztv20btAxisSweep3InternalItE,
  ztv20btCollisionAlgorithm,
  ztv28btHashedOverlappingPairCache,
  ztvzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback,
  ztvzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback,
  functionTable
} from './commonFile';
function zn20btAxisSweep3InternalItE11createProxyERK9btVector3S3IPvssP12btDispatcherS4(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let r15: number = 0;
  let r16: number = 0;
  let r17: number = 0;
  let r18: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg56;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = r0 >> numDefine2;
  f0 = heapClassInst.heapFloat[r1];
  f1 = heapClassInst.heapFloat[r1 + 1];
  f2 = heapClassInst.heapFloat[r1 + numDefine2];
  r1 = heapClassInst.heap32[fp];
  r2 = sp + numDefineNeg6;
  heapClassInst.heap32[g0] = r1;
  heapClassInst.heap32[g0 + 1] = r2;
  heapClassInst.heapFloat[g0 + numDefine2] = f0;
  heapClassInst.heapFloat[g0 + numDefine3] = f1;
  heapClassInst.heapFloat[g0 + numDefine4] = f2;
  heapClassInst.heap32[g0 + numDefine5] = 0;
  r2 = heapClassInst.heap32[fp + numDefine2];
  znk20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(i7);
  r3 = r2 >> numDefine2;
  f0 = heapClassInst.heapFloat[r3];
  f1 = heapClassInst.heapFloat[r3 + 1];
  f2 = heapClassInst.heapFloat[r3 + numDefine2];
  r3 = sp + numDefineNeg12;
  heapClassInst.heap32[g0] = r1;
  heapClassInst.heap32[g0 + 1] = r3;
  heapClassInst.heapFloat[g0 + numDefine2] = f0;
  heapClassInst.heapFloat[g0 + numDefine3] = f1;
  heapClassInst.heapFloat[g0 + numDefine4] = f2;
  heapClassInst.heap32[g0 + numDefine5] = 1;
  znk20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(i7);
  r3 = heapClassInst.heapU16[(r1 + numDefine64) >> 1];
  if (r3 !== 0) {
    r4 = heapClassInst.heap32[fp + numDefine4];
    r5 = heapClassInst.heap32[fp + numDefine5];
    r6 = heapClassInst.heap32[fp + numDefine6];
    r7 = heapClassInst.heap32[fp + numDefine7];
    r8 = heapClassInst.heap32[fp + numDefine8];
    r9 = r1 >> numDefine2;
    r10 = r3 << numDefine6;
    r11 = heapClassInst.heap32[r9 + numDefine15];
    r10 = (r11 + r10) | 0;
    r11 = heapClassInst.heapU16[(r10 + numDefine48) >> 1];
    heapClassInst.heap16[(r1 + numDefine64) >> 1] = r11;
    r11 = heapClassInst.heapU16[(r1 + numDefine56) >> 1];
    r11 = (r11 + 1) | 0;
    r12 = r10 >> numDefine2;
    heapClassInst.heap16[(r1 + numDefine56) >> 1] = r11;
    heapClassInst.heap32[r12 + numDefine3] = r3;
    heapClassInst.heap32[r12] = r4;
    heapClassInst.heap16[(r10 + numDefine4) >> 1] = r5;
    heapClassInst.heap16[(r10 + numDefine6) >> 1] = r6;
    heapClassInst.heap32[r12 + numDefine2] = r8;
    r8 = heapClassInst.heap32[r9 + numDefine15];
    r11 = heapClassInst.heapU16[(r1 + numDefine56) >> 1];
    r11 = r11 << 1;
    r12 = heapClassInst.heapU16[(r8 + numDefine54) >> 1];
    r13 = r11 & numDefine65534;
    r12 = (r12 + numDefine2) | 0;
    r14 = (r13 + -1) | 0;
    heapClassInst.heap16[(r8 + numDefine54) >> 1] = r12;
    r8 = r14 << numDefine2;
    r12 = heapClassInst.heap32[r9 + numDefine17];
    r14 = (r12 + r8) | 0;
    r15 = r13 | 1;
    r14 = heapClassInst.heapU16[(r14 + numDefine2) >> 1];
    r16 = heapClassInst.heapU16[(r12 + r8) >> 1];
    r15 = r15 << numDefine2;
    r17 = (r12 + r15) | 0;
    heapClassInst.heap16[(r12 + r15) >> 1] = r16;
    heapClassInst.heap16[(r17 + numDefine2) >> 1] = r14;
    r12 = heapClassInst.heap32[r9 + numDefine17];
    r14 = heapClassInst.heapU16[(sp + numDefineNeg6) >> 1];
    heapClassInst.heap16[(r12 + r8) >> 1] = r14;
    r12 = heapClassInst.heap32[r9 + numDefine17];
    r12 = (r12 + r8) | 0;
    heapClassInst.heap16[(r12 + numDefine2) >> 1] = r3;
    r12 = heapClassInst.heap32[r9 + numDefine17];
    r14 = heapClassInst.heapU16[(sp + numDefineNeg12) >> 1];
    r13 = r13 << numDefine2;
    heapClassInst.heap16[(r12 + r13) >> 1] = r14;
    r12 = heapClassInst.heap32[r9 + numDefine17];
    r12 = (r12 + r13) | 0;
    r14 = (r11 + -1) | 0;
    heapClassInst.heap16[(r12 + numDefine2) >> 1] = r3;
    heapClassInst.heap16[(r10 + numDefine48) >> 1] = r14;
    heapClassInst.heap16[(r10 + numDefine54) >> 1] = r11;
    r12 = heapClassInst.heap32[r9 + numDefine15];
    r16 = heapClassInst.heapU16[(r12 + numDefine56) >> 1];
    r16 = (r16 + numDefine2) | 0;
    heapClassInst.heap16[(r12 + numDefine56) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine18];
    r16 = (r12 + r8) | 0;
    r16 = heapClassInst.heapU16[(r16 + numDefine2) >> 1];
    r17 = heapClassInst.heapU16[(r12 + r8) >> 1];
    r18 = (r12 + r15) | 0;
    heapClassInst.heap16[(r12 + r15) >> 1] = r17;
    heapClassInst.heap16[(r18 + numDefine2) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine18];
    r16 = heapClassInst.heapU16[(sp + numDefineNeg4) >> 1];
    heapClassInst.heap16[(r12 + r8) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine18];
    r12 = (r12 + r8) | 0;
    heapClassInst.heap16[(r12 + numDefine2) >> 1] = r3;
    r12 = heapClassInst.heap32[r9 + numDefine18];
    r16 = heapClassInst.heapU16[(sp + numDefineNeg10) >> 1];
    heapClassInst.heap16[(r12 + r13) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine18];
    r12 = (r12 + r13) | 0;
    heapClassInst.heap16[(r12 + numDefine2) >> 1] = r3;
    heapClassInst.heap16[(r10 + numDefine50) >> 1] = r14;
    heapClassInst.heap16[(r10 + numDefine56) >> 1] = r11;
    r12 = heapClassInst.heap32[r9 + numDefine15];
    r16 = heapClassInst.heapU16[(r12 + numDefine58) >> 1];
    r16 = (r16 + numDefine2) | 0;
    heapClassInst.heap16[(r12 + numDefine58) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine19];
    r16 = (r12 + r8) | 0;
    r16 = heapClassInst.heapU16[(r16 + numDefine2) >> 1];
    r17 = heapClassInst.heapU16[(r12 + r8) >> 1];
    r18 = (r12 + r15) | 0;
    heapClassInst.heap16[(r12 + r15) >> 1] = r17;
    heapClassInst.heap16[(r18 + numDefine2) >> 1] = r16;
    r12 = heapClassInst.heap32[r9 + numDefine19];
    r15 = heapClassInst.heapU16[(sp + numDefineNeg2) >> 1];
    heapClassInst.heap16[(r12 + r8) >> 1] = r15;
    r12 = heapClassInst.heap32[r9 + numDefine19];
    r8 = (r12 + r8) | 0;
    heapClassInst.heap16[(r8 + numDefine2) >> 1] = r3;
    r8 = heapClassInst.heap32[r9 + numDefine19];
    r12 = heapClassInst.heapU16[(sp + numDefineNeg8) >> 1];
    heapClassInst.heap16[(r8 + r13) >> 1] = r12;
    r8 = heapClassInst.heap32[r9 + numDefine19];
    r8 = (r8 + r13) | 0;
    heapClassInst.heap16[(r8 + numDefine2) >> 1] = r3;
    heapClassInst.heap16[(r10 + numDefine52) >> 1] = r14;
    heapClassInst.heap16[(r10 + numDefine58) >> 1] = r11;
    r8 = heapClassInst.heapU16[(r10 + numDefine48) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = 0;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = 0;
    zn20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(i7);
    r8 = heapClassInst.heapU16[(r10 + numDefine54) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = 0;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = r7;
    heapClassInst.heap32[g0 + numDefine4] = 0;
    zn20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(i7);
    r8 = heapClassInst.heapU16[(r10 + numDefine50) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = 1;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = 0;
    zn20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(i7);
    r8 = heapClassInst.heapU16[(r10 + numDefine56) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = 1;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = r7;
    heapClassInst.heap32[g0 + numDefine4] = 0;
    zn20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(i7);
    r8 = heapClassInst.heapU16[(r10 + numDefine52) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = numDefine2;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = 1;
    zn20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(i7);
    r8 = heapClassInst.heapU16[(r10 + numDefine58) >> 1];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = numDefine2;
    heapClassInst.heap32[g0 + numDefine2] = r8;
    heapClassInst.heap32[g0 + numDefine3] = r7;
    heapClassInst.heap32[g0 + numDefine4] = 1;
    zn20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(i7);
    updateMandreelStats(ArkTools.timeInUs());
    r1 = heapClassInst.heap32[r9 + numDefine27];
    r8 = heapClassInst.heap32[r9 + numDefine15];
    if (!(r1 === 0)) {
      r9 = heapClassInst.heap32[fp + numDefine3];
      r10 = r1 >> numDefine2;
      r10 = heapClassInst.heap32[r10];
      r10 = r10 >> numDefine2;
      r10 = heapClassInst.heap32[r10 + numDefine2];
      r11 = r3 << numDefine6;
      heapClassInst.heap32[g0] = r1;
      heapClassInst.heap32[g0 + 1] = r0;
      heapClassInst.heap32[g0 + numDefine2] = r2;
      heapClassInst.heap32[g0 + numDefine3] = r9;
      heapClassInst.heap32[g0 + numDefine4] = r4;
      heapClassInst.heap32[g0 + numDefine5] = r5;
      heapClassInst.heap32[g0 + numDefine6] = r6;
      heapClassInst.heap32[g0 + numDefine7] = r7;
      heapClassInst.heap32[g0 + numDefine8] = 0;
      r0 = (r8 + r11) | 0;
      r0 = r0 >> numDefine2;
      functionTable[r10 >> numDefine2](i7);
      heapClassInst.heap32[r0 + numDefine15] = commonVariable.rg0;
    }
    r0 = r3 << numDefine6;
    r0 = (r8 + r0) | 0;
    commonVariable.rg0 = r0;
    return;
  } else {
    r0 = twoEStr213;
    r1 = twoEStr112;
    heapClassInst.heap32[g0] = r0;
    heapClassInst.heap32[g0 + 1] = r1;
    heapClassInst.heap32[g0 + numDefine2] = numDefine483;
    assertNew(i7);
  }
}

function zn20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r1 + 1];
  r3 = heapClassInst.heap32[fp + 1];
  repeat1: do {
    if (!(r2 > r3)) {
      if (!(r2 >= r3)) {
        r4 = heapClassInst.heap32[r1 + numDefine2];
        if (!(r4 >= r3)) {
          if (r3 !== 0) {
            r4 = gNumAlignedAllocs;
            r4 = r4 >> numDefine2;
            r5 = heapClassInst.heap32[r4];
            r6 = r3 << numDefine4;
            r5 = (r5 + 1) | 0;
            r6 = r6 | numDefine3;
            heapClassInst.heap32[r4] = r5;
            r4 = (r6 + numDefine16) | 0;
            heapClassInst.heap32[g0] = r4;
            mallocNew(i7);
            r4 = commonVariable.rg0;
            if (r4 !== 0) {
              r5 = 0;
              r6 = (r4 + numDefine4) | 0;
              r5 = (r5 - r6) | 0;
              r5 = r5 & numDefine15;
              r5 = (r4 + r5) | 0;
              r6 = (r5 + numDefine4) | 0;
              r5 = r5 >> numDefine2;
              heapClassInst.heap32[r5] = r4;
              r4 = r6;
            }
          } else {
            r4 = 0;
          }
          r5 = (r0 + numDefine12) | 0;
          if (r2 < 1) {
            r6 = r5 >> numDefine2;
            r8 = heapClassInst.heap32[r6];
          } else {
            r6 = 0;
            r7 = (r6 - r2) | 0;
            repeat14: while (true) {
              r8 = r5 >> numDefine2;
              r8 = heapClassInst.heap32[r8];
              r9 = r6 << numDefine4;
              r10 = (r8 - r9) | 0;
              r10 = r10 >> numDefine2;
              r9 = (r4 - r9) | 0;
              r11 = heapClassInst.heap32[r10];
              r9 = r9 >> numDefine2;
              heapClassInst.heap32[r9] = r11;
              r11 = heapClassInst.heap32[r10 + 1];
              heapClassInst.heap32[r9 + 1] = r11;
              r11 = heapClassInst.heap32[r10 + numDefine2];
              heapClassInst.heap32[r9 + numDefine2] = r11;
              r10 = heapClassInst.heap32[r10 + numDefine3];
              r6 = (r6 + -1) | 0;
              heapClassInst.heap32[r9 + numDefine3] = r10;
              if (!(r7 !== r6)) {
                break repeat14;
              }
            }
            r5 = (r0 + numDefine12) | 0;
          }
          if (!(r8 === 0)) {
            r6 = heapClassInst.heapU8[r0 + numDefine16];
            if (!(r6 === 0)) {
              r6 = gNumAlignedFree;
              r6 = r6 >> numDefine2;
              r7 = heapClassInst.heap32[r6];
              r7 = (r7 + 1) | 0;
              r8 = r8 >> numDefine2;
              heapClassInst.heap32[r6] = r7;
              r6 = heapClassInst.heap32[r8 + -1];
              heapClassInst.heap32[g0] = r6;
              free(i7);
            }
            r6 = r5 >> numDefine2;
            heapClassInst.heap32[r6] = 0;
          }
          r6 = 1;
          r5 = r5 >> numDefine2;
          heapClassInst.heap8[r0 + numDefine16] = r6;
          heapClassInst.heap32[r5] = r4;
          heapClassInst.heap32[r1 + numDefine2] = r3;
          if (r2 >= r3) {
            break repeat1;
          }
        }
        r0 = heapClassInst.heap32[fp + numDefine2];
        repeat25: while (true) {
          r4 = r0 >> numDefine2;
          r5 = r2 << numDefine4;
          r6 = heapClassInst.heap32[r1 + numDefine3];
          r5 = (r6 + r5) | 0;
          r6 = heapClassInst.heap32[r4];
          r5 = r5 >> numDefine2;
          heapClassInst.heap32[r5] = r6;
          r6 = heapClassInst.heap32[r4 + 1];
          heapClassInst.heap32[r5 + 1] = r6;
          r6 = heapClassInst.heap32[r4 + numDefine2];
          heapClassInst.heap32[r5 + numDefine2] = r6;
          r4 = heapClassInst.heap32[r4 + numDefine3];
          r2 = (r2 + 1) | 0;
          heapClassInst.heap32[r5 + numDefine3] = r4;
          if (r3 !== r2) {
            continue repeat25;
          } else {
            break repeat1;
          }
        }
      }
    }
  } while (false);
  heapClassInst.heap32[r1 + 1] = r3;
  return;
}

function zn20btAxisSweep3InternalItE25calculateOverlappingPairsEP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg48;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0 + numDefine23];
  r2 = r1 >> numDefine2;
  r2 = heapClassInst.heap32[r2];
  r2 = r2 >> numDefine2;
  r2 = heapClassInst.heap32[r2 + numDefine14];
  heapClassInst.heap32[g0] = r1;
  functionTable[r2 >> numDefine2](i7);
  r1 = commonVariable.rg0;
  if (!(r1 === 0)) {
    r1 = heapClassInst.heap32[fp + 1];
    r2 = heapClassInst.heap32[r0 + numDefine23];
    r3 = r2 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine7];
    heapClassInst.heap32[g0] = r2;
    functionTable[r3 >> numDefine2](i7);
    r2 = commonVariable.rg0;
    r3 = r2 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + 1];
    if (r3 > 1) {
      r3 = (r3 + -1) | 0;
      heapClassInst.heap32[g0] = r2;
      heapClassInst.heap32[g0 + 1] = 0;
      heapClassInst.heap32[g0 + numDefine2] = r3;
      r3 = r2 >> numDefine2;
      zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi(i7);
      r3 = heapClassInst.heap32[r3 + 1];
    }
    r4 = sp + numDefineNeg32;
    r5 = r4 >> numDefine2;
    heapClassInst.heap32[fp + numDefineNeg8] = 0;
    heapClassInst.heap32[r5 + 1] = 0;
    heapClassInst.heap32[r5 + numDefine2] = 0;
    heapClassInst.heap32[r5 + numDefine3] = 0;
    r5 = heapClassInst.heap32[r0 + numDefine26];
    r3 = (r3 - r5) | 0;
    heapClassInst.heap32[g0] = r2;
    heapClassInst.heap32[g0 + 1] = r3;
    heapClassInst.heap32[g0 + numDefine2] = r4;
    r3 = 0;
    zn20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0(i7);
    heapClassInst.heap32[r0 + numDefine26] = 0;
    r4 = r3;
    r5 = r3;
    r6 = r3;
    r7 = r3;
    repeat6: while (true) {
      r8 = r2 >> numDefine2;
      r9 = heapClassInst.heap32[r8 + 1];
      if (r9 > r7) {
        r8 = heapClassInst.heap32[r8 + numDefine3];
        r9 = r7 << numDefine4;
        r9 = (r8 + r9) | 0;
        r9 = r9 >> numDefine2;
        r10 = heapClassInst.heap32[r9];
        r11 = r7 << numDefine2;
        r12 = heapClassInst.heap32[r9 + 1];
        if (r10 !== r5) {
          label = numDefine6;
        } else {
          if (r12 === r6) {
            r4 = heapClassInst.heap32[r9 + numDefine2];
            if (r4 === 0) {
              label = numDefine13;
            } else {
              label = numDefine12;
              break repeat6;
            }
          } else {
            label = numDefine6;
          }
        }
        if (label === numDefine6) {
          r5 = (r12 + numDefine54) | 0;
          r6 = (r10 + numDefine48) | 0;
          r9 = 0;
          repeat14: while (true) {
            if (r9 < numDefine3) {
              r13 = heapClassInst.heapU16[(r6 + numDefine6) >> 1];
              r14 = heapClassInst.heapU16[(r5 + numDefineNeg6) >> 1];
              if (uint(r13) < uint(r14)) {
                label = numDefine13;
                break repeat14;
              } else {
                r13 = heapClassInst.heapU16[r5 >> 1];
                r14 = heapClassInst.heapU16[r6 >> 1];
                if (uint(r13) < uint(r14)) {
                  label = numDefine13;
                  break repeat14;
                } else {
                  r9 = (r9 + 1) | 0;
                  r5 = (r5 + numDefine2) | 0;
                  r6 = (r6 + numDefine2) | 0;
                }
              }
            } else {
              label = numDefine14;
              break repeat14;
            }
          }
        }
        if (label === numDefine13) {
          r4 = heapClassInst.heap32[r0 + numDefine23];
          r5 = r4 >> numDefine2;
          r5 = heapClassInst.heap32[r5];
          r5 = r5 >> numDefine2;
          r5 = heapClassInst.heap32[r5 + numDefine8];
          r6 = (r8 + r3) | 0;
          r9 = r11 << numDefine2;
          heapClassInst.heap32[g0] = r4;
          heapClassInst.heap32[g0 + 1] = r6;
          heapClassInst.heap32[g0 + numDefine2] = r1;
          r4 = (r8 + r9) | 0;
          r4 = r4 >> numDefine2;
          functionTable[r5 >> numDefine2](i7);
          heapClassInst.heap32[r4] = 0;
          heapClassInst.heap32[r4 + 1] = 0;
          r4 = heapClassInst.heap32[r0 + numDefine26];
          r4 = (r4 + 1) | 0;
          r5 = gOverlappingPairs;
          r5 = r5 >> numDefine2;
          heapClassInst.heap32[r0 + numDefine26] = r4;
          r6 = heapClassInst.heap32[r5];
          r6 = (r6 + -1) | 0;
          heapClassInst.heap32[r5] = r6;
        }
        r7 = (r7 + 1) | 0;
        r3 = (r3 + numDefine16) | 0;
        r5 = r10;
        r6 = r12;
      } else {
        label = numDefine16;
        break repeat6;
      }
    }
    switch (label) {
      case numDefine16:
        if (r9 > 1) {
          r4 = (r9 + -1) | 0;
          heapClassInst.heap32[g0] = r2;
          heapClassInst.heap32[g0 + 1] = 0;
          heapClassInst.heap32[g0 + numDefine2] = r4;
          zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi(i7);
          r9 = heapClassInst.heap32[r8 + 1];
          r4 = heapClassInst.heap32[r0 + numDefine26];
        }
        r1 = sp + numDefineNeg16;
        r3 = r1 >> numDefine2;
        heapClassInst.heap32[fp + numDefineNeg4] = 0;
        heapClassInst.heap32[r3 + 1] = 0;
        heapClassInst.heap32[r3 + numDefine2] = 0;
        heapClassInst.heap32[r3 + numDefine3] = 0;
        r3 = (r9 - r4) | 0;
        heapClassInst.heap32[g0] = r2;
        heapClassInst.heap32[g0 + 1] = r3;
        heapClassInst.heap32[g0 + numDefine2] = r1;
        zn20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0(i7);
        heapClassInst.heap32[r0 + numDefine26] = 0;
        break;
      case numDefine12:
        r8 = twoEStr314;
        r0 = twoEStr112;
        heapClassInst.heap32[g0] = r8;
        heapClassInst.heap32[g0 + 1] = r0;
        heapClassInst.heap32[g0 + numDefine2] = numDefine687;
        assertNew(i7);
        break;
      default:
        break;
    }
  }
  return;
}

function zn20btAxisSweep3InternalItED2Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20btAxisSweep3InternalItE;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine27];
  if (!(r1 === 0)) {
    r1 = heapClassInst.heap32[r2 + numDefine28];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine28];
    if (!(r1 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
    r1 = heapClassInst.heap32[r2 + numDefine27];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine27];
    if (!(r1 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
  }
  r1 = 0;
  repeat8: while (true) {
    r3 = r1 << numDefine2;
    r3 = (r0 + r3) | 0;
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine22];
    if (!(r3 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    r1 = (r1 + -1) | 0;
    if (r1 !== numDefineNeg3) {
      continue repeat8;
    } else {
      break repeat8;
    }
  }
  r1 = heapClassInst.heap32[r2 + numDefine15];
  if (!(r1 === 0)) {
    r3 = gNumAlignedFree;
    r3 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r3];
    r4 = (r4 + 1) | 0;
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r3] = r4;
    r1 = heapClassInst.heap32[r1 + -1];
    heapClassInst.heap32[g0] = r1;
    free(i7);
  }
  r0 = heapClassInst.heapU8[r0 + numDefine100];
  if (!(r0 === 0)) {
    r0 = heapClassInst.heap32[r2 + numDefine23];
    r1 = r0 >> numDefine2;
    r1 = heapClassInst.heap32[r1];
    r1 = r1 >> numDefine2;
    r1 = heapClassInst.heap32[r1];
    heapClassInst.heap32[g0] = r0;
    functionTable[r1 >> numDefine2](i7);
    r0 = heapClassInst.heap32[r2 + numDefine23];
    if (!(r0 === 0)) {
      r1 = gNumAlignedFree;
      r1 = r1 >> numDefine2;
      r2 = heapClassInst.heap32[r1];
      r2 = (r2 + 1) | 0;
      r0 = r0 >> numDefine2;
      heapClassInst.heap32[r1] = r2;
      r0 = heapClassInst.heap32[r0 + -1];
      heapClassInst.heap32[g0] = r0;
      free(i7);
    }
  }
  return;
}

function zn20btAxisSweep3InternalItED1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  heapClassInst.heap32[g0] = r0;
  zn20btAxisSweep3InternalItED2Ev(i7);
  return;
}

function zn20btAxisSweep3InternalItED0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20btAxisSweep3InternalItE;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine27];
  if (!(r1 === 0)) {
    r1 = heapClassInst.heap32[r2 + numDefine28];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine28];
    if (!(r1 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
    r1 = heapClassInst.heap32[r2 + numDefine27];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine27];
    if (!(r1 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
  }
  r1 = 0;
  repeat8: while (true) {
    r3 = r1 << numDefine2;
    r3 = (r0 + r3) | 0;
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine22];
    if (!(r3 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    r1 = (r1 + -1) | 0;
    if (r1 !== numDefineNeg3) {
      continue repeat8;
    } else {
      break repeat8;
    }
  }
  r1 = heapClassInst.heap32[r2 + numDefine15];
  if (!(r1 === 0)) {
    r3 = gNumAlignedFree;
    r3 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r3];
    r4 = (r4 + 1) | 0;
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r3] = r4;
    r1 = heapClassInst.heap32[r1 + -1];
    heapClassInst.heap32[g0] = r1;
    free(i7);
  }
  r0 = heapClassInst.heapU8[r0 + numDefine100];
  if (!(r0 === 0)) {
    r0 = heapClassInst.heap32[r2 + numDefine23];
    r1 = r0 >> numDefine2;
    r1 = heapClassInst.heap32[r1];
    r1 = r1 >> numDefine2;
    r1 = heapClassInst.heap32[r1];
    heapClassInst.heap32[g0] = r0;
    functionTable[r1 >> numDefine2](i7);
    r0 = heapClassInst.heap32[r2 + numDefine23];
    if (!(r0 === 0)) {
      r1 = gNumAlignedFree;
      r1 = r1 >> numDefine2;
      r3 = heapClassInst.heap32[r1];
      r3 = (r3 + 1) | 0;
      r0 = r0 >> numDefine2;
      heapClassInst.heap32[r1] = r3;
      r0 = heapClassInst.heap32[r0 + -1];
      heapClassInst.heap32[g0] = r0;
      free(i7);
    }
  }
  r0 = gNumAlignedFree;
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0];
  r1 = (r1 + 1) | 0;
  heapClassInst.heap32[r0] = r1;
  r0 = heapClassInst.heap32[r2 + -1];
  heapClassInst.heap32[g0] = r0;
  free(i7);
  return;
}

function zn12btAxisSweep3D0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv12btAxisSweep3;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zn20btAxisSweep3InternalItED2Ev(i7);
  if (!(r0 === 0)) {
    r0 = gNumAlignedFree;
    r0 = r0 >> numDefine2;
    r1 = heapClassInst.heap32[r0];
    r1 = (r1 + 1) | 0;
    heapClassInst.heap32[r0] = r1;
    r0 = heapClassInst.heap32[r2 + -1];
    heapClassInst.heap32[g0] = r0;
    free(i7);
  }
  return;
}

function zn12btAxisSweep3D1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv12btAxisSweep3;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zn20btAxisSweep3InternalItED2Ev(i7);
  return;
}

function zn20btCollisionAlgorithmD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20btCollisionAlgorithm;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zn20btCollisionAlgorithmD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20btCollisionAlgorithm;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  return;
}

function zn6btDbvt8ICollide7ProcessEPK10btDbvtNodef(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r1];
  r1 = r1 >> numDefine2;
  r1 = heapClassInst.heap32[r1 + numDefine3];
  r2 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r2;
  functionTable[r1 >> numDefine2](i7);
  return;
}

function zn6btDbvt8ICollide7DescentEPK10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = 1;
  commonVariable.rg0 = r0;
  return;
}

function zn6btDbvt8ICollide9AllLeavesEPK10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = 1;
  commonVariable.rg0 = r0;
  return;
}

function zl10insertleafP6btDbvtP10btDbvtNodeS2(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let f8: number = 0.0;
  let f9: number = 0.0;
  let f10: number = 0.0;
  let f11: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = heapClassInst.heap32[fp + numDefine2];
  r0 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r0];
  if (r2 !== 0) {
    r2 = heapClassInst.heap32[fp + 1];
    r3 = r2 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine10];
    if (r3 !== 0) {
      r4 = r1 >> numDefine2;
      f0 = heapClassInst.heapFloat[r4 + numDefine2];
      f1 = heapClassInst.heapFloat[r4 + numDefine6];
      f2 = heapClassInst.heapFloat[r4 + 1];
      f3 = heapClassInst.heapFloat[r4 + numDefine5];
      f4 = heapClassInst.heapFloat[r4];
      f5 = heapClassInst.heapFloat[r4 + numDefine4];
      f0 = f0 + f1;
      f1 = f2 + f3;
      f2 = f4 + f5;
      repeat5: while (true) {
        r4 = r2 >> numDefine2;
        r4 = heapClassInst.heap32[r4 + numDefine9];
        r4 = r4 >> numDefine2;
        f3 = heapClassInst.heapFloat[r4];
        f4 = heapClassInst.heapFloat[r4 + numDefine4];
        f5 = heapClassInst.heapFloat[r4 + numDefine2];
        f6 = heapClassInst.heapFloat[r4 + numDefine6];
        f7 = heapClassInst.heapFloat[r4 + 1];
        f8 = heapClassInst.heapFloat[r4 + numDefine5];
        f3 = f3 + f4;
        f4 = f5 + f6;
        f5 = f7 + f8;
        f3 = f2 - f3;
        f4 = f0 - f4;
        f5 = f1 - f5;
        f6 = 0;
        if (f3 < f6) {
          f3 = -f3;
        }
        if (f5 < f6) {
          f5 = -f5;
        }
        f3 = f3 + f5;
        if (f4 < f6) {
          f4 = -f4;
        }
        r3 = r3 >> numDefine2;
        f5 = heapClassInst.heapFloat[r3];
        f7 = heapClassInst.heapFloat[r3 + numDefine4];
        f8 = heapClassInst.heapFloat[r3 + numDefine2];
        f9 = heapClassInst.heapFloat[r3 + numDefine6];
        f10 = heapClassInst.heapFloat[r3 + 1];
        f11 = heapClassInst.heapFloat[r3 + numDefine5];
        f5 = f5 + f7;
        f7 = f8 + f9;
        f8 = f10 + f11;
        f5 = f2 - f5;
        f3 = f3 + f4;
        f4 = f0 - f7;
        f7 = f1 - f8;
        if (f5 < f6) {
          f5 = -f5;
        }
        if (f7 < f6) {
          f7 = -f7;
        }
        f5 = f5 + f7;
        if (f4 < f6) {
          f4 = -f4;
        }
        f4 = f5 + f4;
        r3 = f3 >= f4 ? 1 : 0;
        r3 = r3 & 1;
        r3 = r3 << numDefine2;
        r2 = (r2 + r3) | 0;
        r2 = r2 >> numDefine2;
        r2 = heapClassInst.heap32[r2 + numDefine9];
        r3 = r2 >> numDefine2;
        r3 = heapClassInst.heap32[r3 + numDefine10];
        if (!(r3 !== 0)) {
          break repeat5;
        }
      }
    }
    r3 = r2 >> numDefine2;
    r4 = heapClassInst.heap32[r0 + 1];
    r5 = heapClassInst.heap32[r3 + numDefine8];
    if (r4 === 0) {
      r4 = gNumAlignedAllocs;
      r4 = r4 >> numDefine2;
      r6 = heapClassInst.heap32[r4];
      r6 = (r6 + 1) | 0;
      heapClassInst.heap32[r4] = r6;
      heapClassInst.heap32[g0] = numDefine63;
      mallocNew(i7);
      r4 = commonVariable.rg0;
      if (r4 !== 0) {
        r6 = 0;
        r7 = (r4 + numDefine4) | 0;
        r6 = (r6 - r7) | 0;
        r6 = r6 & numDefine15;
        r6 = (r4 + r6) | 0;
        r7 = (r6 + numDefine4) | 0;
        r6 = r6 >> numDefine2;
        heapClassInst.heap32[r6] = r4;
        r4 = r7;
      }
    } else {
      heapClassInst.heap32[r0 + 1] = 0;
    }
    r6 = r4 >> numDefine2;
    heapClassInst.heap32[r6 + numDefine8] = r5;
    heapClassInst.heap32[r6 + numDefine9] = 0;
    heapClassInst.heap32[r6 + numDefine10] = 0;
    r7 = r1 >> numDefine2;
    f0 = heapClassInst.heapFloat[r7];
    f1 = heapClassInst.heapFloat[r3];
    f0 = f0 < f1 ? f0 : f1;
    heapClassInst.heapFloat[r6] = f0;
    f0 = heapClassInst.heapFloat[r7 + numDefine4];
    f1 = heapClassInst.heapFloat[r3 + numDefine4];
    f0 = f0 > f1 ? f0 : f1;
    heapClassInst.heapFloat[r6 + numDefine4] = f0;
    f0 = heapClassInst.heapFloat[r7 + 1];
    f1 = heapClassInst.heapFloat[r3 + 1];
    f0 = f0 < f1 ? f0 : f1;
    heapClassInst.heapFloat[r6 + 1] = f0;
    f0 = heapClassInst.heapFloat[r7 + numDefine5];
    f1 = heapClassInst.heapFloat[r3 + numDefine5];
    f0 = f0 > f1 ? f0 : f1;
    heapClassInst.heapFloat[r6 + numDefine5] = f0;
    f0 = heapClassInst.heapFloat[r7 + numDefine2];
    f1 = heapClassInst.heapFloat[r3 + numDefine2];
    f0 = f0 < f1 ? f0 : f1;
    heapClassInst.heapFloat[r6 + numDefine2] = f0;
    f0 = heapClassInst.heapFloat[r7 + numDefine6];
    f1 = heapClassInst.heapFloat[r3 + numDefine6];
    f0 = f0 > f1 ? f0 : f1;
    heapClassInst.heapFloat[r6 + numDefine6] = f0;
    repeat31: do {
      if (r5 === 0) {
        heapClassInst.heap32[r6 + numDefine9] = r2;
        heapClassInst.heap32[r3 + numDefine8] = r4;
        heapClassInst.heap32[r6 + numDefine10] = r1;
        heapClassInst.heap32[r7 + numDefine8] = r4;
        heapClassInst.heap32[r0] = r4;
      } else {
        r0 = heapClassInst.heap32[r3 + numDefine8];
        r0 = r0 >> numDefine2;
        r0 = heapClassInst.heap32[r0 + numDefine10];

        r0 = r0 === r2 ? 1 : 0;
        r0 = r0 & 1;
        r0 = r0 << numDefine2;
        r0 = (r5 + r0) | 0;
        r0 = r0 >> numDefine2;
        heapClassInst.heap32[r0 + numDefine9] = r4;
        heapClassInst.heap32[r6 + numDefine9] = r2;
        heapClassInst.heap32[r3 + numDefine8] = r4;
        heapClassInst.heap32[r6 + numDefine10] = r1;
        heapClassInst.heap32[r7 + numDefine8] = r4;
        f0 = heapClassInst.heapFloat[r6];
        while (true) {
          r0 = r5;
          r1 = r0 >> numDefine2;
          f1 = heapClassInst.heapFloat[r1];
          if (!(f1 > f0)) {
            r2 = r4 >> numDefine2;
            f0 = heapClassInst.heapFloat[r1 + 1];
            f1 = heapClassInst.heapFloat[r2 + 1];
            if (!(f0 > f1)) {
              f0 = heapClassInst.heapFloat[r1 + numDefine2];
              f1 = heapClassInst.heapFloat[r2 + numDefine2];
              if (!(f0 > f1)) {
                f0 = heapClassInst.heapFloat[r1 + numDefine4];
                f1 = heapClassInst.heapFloat[r2 + numDefine4];
                if (!(f0 < f1)) {
                  f0 = heapClassInst.heapFloat[r1 + numDefine5];
                  f1 = heapClassInst.heapFloat[r2 + numDefine5];
                  if (!(f0 < f1)) {
                    f0 = heapClassInst.heapFloat[r1 + numDefine6];
                    f1 = heapClassInst.heapFloat[r2 + numDefine6];
                    if (f0 >= f1) {
                      break repeat31;
                    }
                  }
                }
              }
            }
          }
          r2 = heapClassInst.heap32[r1 + numDefine10];
          r3 = heapClassInst.heap32[r1 + numDefine9];
          r2 = r2 >> numDefine2;
          r3 = r3 >> numDefine2;
          f0 = heapClassInst.heapFloat[r3];
          f1 = heapClassInst.heapFloat[r2];
          f0 = f0 < f1 ? f0 : f1;
          heapClassInst.heapFloat[r1] = f0;
          f1 = heapClassInst.heapFloat[r3 + numDefine4];
          f2 = heapClassInst.heapFloat[r2 + numDefine4];
          f1 = f1 > f2 ? f1 : f2;
          heapClassInst.heapFloat[r1 + numDefine4] = f1;
          f1 = heapClassInst.heapFloat[r3 + 1];
          f2 = heapClassInst.heapFloat[r2 + 1];
          f1 = f1 < f2 ? f1 : f2;
          heapClassInst.heapFloat[r1 + 1] = f1;
          f1 = heapClassInst.heapFloat[r3 + numDefine5];
          f2 = heapClassInst.heapFloat[r2 + numDefine5];
          f1 = f1 > f2 ? f1 : f2;
          heapClassInst.heapFloat[r1 + numDefine5] = f1;
          f1 = heapClassInst.heapFloat[r3 + numDefine2];
          f2 = heapClassInst.heapFloat[r2 + numDefine2];
          f1 = f1 < f2 ? f1 : f2;
          heapClassInst.heapFloat[r1 + numDefine2] = f1;
          f1 = heapClassInst.heapFloat[r3 + numDefine6];
          f2 = heapClassInst.heapFloat[r2 + numDefine6];
          f1 = f1 > f2 ? f1 : f2;
          heapClassInst.heapFloat[r1 + numDefine6] = f1;
          r5 = heapClassInst.heap32[r1 + numDefine8];
          r4 = r0;
          if (r5 === 0) {
            break repeat31;
          }
        }
      }
    } while (false);
    return;
  } else {
    r2 = r1 >> numDefine2;
    heapClassInst.heap32[r0] = r1;
    heapClassInst.heap32[r2 + numDefine8] = 0;
    return;
  }
}

function zl10removeleafP6btDbvtP10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let f8: number = 0.0;
  let f9: number = 0.0;
  let f10: number = 0.0;
  let f11: number = 0.0;
  let f12: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = heapClassInst.heap32[fp + 1];
  r0 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r0];
  if (r2 !== r1) {
    r2 = r1 >> numDefine2;
    r2 = heapClassInst.heap32[r2 + numDefine8];
    r3 = r2 >> numDefine2;
    r4 = heapClassInst.heap32[r3 + numDefine10];
    r1 = r4 !== r1 ? 1 : 0;
    r1 = r1 & 1;
    r1 = r1 << numDefine2;
    r1 = (r2 + r1) | 0;
    r1 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine8];
    r1 = heapClassInst.heap32[r1 + numDefine9];
    repeat3: do {
      if (r3 === 0) {
        r3 = r1 >> numDefine2;
        heapClassInst.heap32[r0] = r1;
        heapClassInst.heap32[r3 + numDefine8] = 0;
        r3 = heapClassInst.heap32[r0 + 1];
        if (!(r3 === 0)) {
          r1 = gNumAlignedFree;
          r1 = r1 >> numDefine2;
          r4 = heapClassInst.heap32[r1];
          r4 = (r4 + 1) | 0;
          r3 = r3 >> numDefine2;
          heapClassInst.heap32[r1] = r4;
          r3 = heapClassInst.heap32[r3 + -1];
          heapClassInst.heap32[g0] = r3;
          free(i7);
        }
        heapClassInst.heap32[r0 + 1] = r2;
        r3 = heapClassInst.heap32[r0];
      } else {
        r4 = r3 >> numDefine2;
        r4 = heapClassInst.heap32[r4 + numDefine10];
        r4 = r4 === r2 ? 1 : 0;
        r4 = r4 & 1;
        r4 = r4 << numDefine2;
        r4 = (r3 + r4) | 0;
        r4 = r4 >> numDefine2;
        r5 = r1 >> numDefine2;
        heapClassInst.heap32[r4 + numDefine9] = r1;
        heapClassInst.heap32[r5 + numDefine8] = r3;
        r1 = heapClassInst.heap32[r0 + 1];
        if (!(r1 === 0)) {
          r4 = gNumAlignedFree;
          r4 = r4 >> numDefine2;
          r5 = heapClassInst.heap32[r4];
          r5 = (r5 + 1) | 0;
          r1 = r1 >> numDefine2;
          heapClassInst.heap32[r4] = r5;
          r1 = heapClassInst.heap32[r1 + -1];
          heapClassInst.heap32[g0] = r1;
          free(i7);
        }
        heapClassInst.heap32[r0 + 1] = r2;
        repeat12: while (true) {
          if (r3 !== 0) {
            r1 = r3 >> numDefine2;
            r2 = heapClassInst.heap32[r1 + numDefine10];
            r4 = heapClassInst.heap32[r1 + numDefine9];
            r2 = r2 >> numDefine2;
            r4 = r4 >> numDefine2;
            f0 = heapClassInst.heapFloat[r1 + numDefine6];
            f1 = heapClassInst.heapFloat[r1];
            f2 = heapClassInst.heapFloat[r1 + 1];
            f3 = heapClassInst.heapFloat[r1 + numDefine2];
            f4 = heapClassInst.heapFloat[r1 + numDefine4];
            f5 = heapClassInst.heapFloat[r1 + numDefine5];
            f6 = heapClassInst.heapFloat[r4];
            f7 = heapClassInst.heapFloat[r2];
            f6 = f6 < f7 ? f6 : f7;
            heapClassInst.heapFloat[r1] = f6;
            f7 = heapClassInst.heapFloat[r4 + numDefine4];
            f8 = heapClassInst.heapFloat[r2 + numDefine4];
            f7 = f7 > f8 ? f7 : f8;
            heapClassInst.heapFloat[r1 + numDefine4] = f7;
            f8 = heapClassInst.heapFloat[r4 + 1];
            f9 = heapClassInst.heapFloat[r2 + 1];
            f8 = f8 < f9 ? f8 : f9;
            heapClassInst.heapFloat[r1 + 1] = f8;
            f9 = heapClassInst.heapFloat[r4 + numDefine5];
            f10 = heapClassInst.heapFloat[r2 + numDefine5];
            f9 = f9 > f10 ? f9 : f10;
            heapClassInst.heapFloat[r1 + numDefine5] = f9;
            f10 = heapClassInst.heapFloat[r4 + numDefine2];
            f11 = heapClassInst.heapFloat[r2 + numDefine2];
            f10 = f10 < f11 ? f10 : f11;
            heapClassInst.heapFloat[r1 + numDefine2] = f10;
            f11 = heapClassInst.heapFloat[r4 + numDefine6];
            f12 = heapClassInst.heapFloat[r2 + numDefine6];
            f11 = f11 > f12 ? f11 : f12;
            heapClassInst.heapFloat[r1 + numDefine6] = f11;
            if (!(f0 !== f11)) {
              r2 = f1 === f6 ? 1 : 0;
              r4 = f2 === f8 ? 1 : 0;
              r2 = r2 & r4;
              r4 = f3 === f10 ? 1 : 0;
              r2 = r2 & r4;
              r4 = f4 === f7 ? 1 : 0;
              r2 = r2 & r4;
              r4 = f5 === f9 ? 1 : 0;
              r2 = r2 & r4;
              if (r2 !== 0) {
                break repeat3;
              }
            }
            r3 = heapClassInst.heap32[r1 + numDefine8];
          } else {
            break repeat12;
          }
        }
        r0 = heapClassInst.heap32[r0];
        commonVariable.rg0 = r0;
        return;
      }
    } while (false);
    commonVariable.rg0 = r3;
    return;
  } else {
    heapClassInst.heap32[r0] = 0;
    r0 = 0;
    commonVariable.rg0 = r0;
    return;
  }
}

function zn6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmRK9btVector3f(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + numDefine2];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[fp + 1];
  f0 = heapClassInst.heapFloat[r0];
  r2 = heapClassInst.heap32[fp];
  r3 = heapClassInst.heap32[fp + numDefine3];
  f1 = heapClassInst.heapFloat[fp + numDefine4];
  r4 = r1 >> numDefine2;
  f2 = heapClassInst.heapFloat[r4];
  if (f2 <= f0) {
    f2 = heapClassInst.heapFloat[r0 + 1];
    f3 = heapClassInst.heapFloat[r4 + 1];
    if (f3 <= f2) {
      f3 = heapClassInst.heapFloat[r4 + numDefine2];
      f4 = heapClassInst.heapFloat[r0 + numDefine2];
      if (!(f3 > f4)) {
        f3 = heapClassInst.heapFloat[r4 + numDefine4];
        f4 = heapClassInst.heapFloat[r0 + numDefine4];
        if (!(f3 < f4)) {
          f3 = heapClassInst.heapFloat[r4 + numDefine5];
          f4 = heapClassInst.heapFloat[r0 + numDefine5];
          if (!(f3 < f4)) {
            f3 = heapClassInst.heapFloat[r4 + numDefine6];
            f4 = heapClassInst.heapFloat[r0 + numDefine6];
            if (!(f3 < f4)) {
              r0 = 0;
              commonVariable.rg0 = r0;
              return;
            }
          }
        }
      }
    }
  } else {
    f2 = heapClassInst.heapFloat[r0 + 1];
  }
  f0 = f0 - f1;
  f2 = f2 - f1;
  heapClassInst.heapFloat[r0] = f0;
  heapClassInst.heapFloat[r0 + 1] = f2;
  f3 = heapClassInst.heapFloat[r0 + numDefine2];
  f3 = f3 - f1;
  heapClassInst.heapFloat[r0 + numDefine2] = f3;
  f4 = heapClassInst.heapFloat[r0 + numDefine4];
  f4 = f4 + f1;
  heapClassInst.heapFloat[r0 + numDefine4] = f4;
  f5 = heapClassInst.heapFloat[r0 + numDefine5];
  f5 = f5 + f1;
  heapClassInst.heapFloat[r0 + numDefine5] = f5;
  f6 = heapClassInst.heapFloat[r0 + numDefine6];
  f1 = f6 + f1;
  r3 = r3 >> numDefine2;
  heapClassInst.heapFloat[r0 + numDefine6] = f1;
  f6 = heapClassInst.heapFloat[r3];
  f7 = 0;
  if (f6 <= f7) {
    f0 = f0 + f6;
    heapClassInst.heapFloat[r0] = f0;
  } else {
    f0 = f4 + f6;
    heapClassInst.heapFloat[r0 + numDefine4] = f0;
  }
  f0 = heapClassInst.heapFloat[r3 + 1];
  if (f0 <= f7) {
    f0 = f2 + f0;
    heapClassInst.heapFloat[r0 + 1] = f0;
  } else {
    f0 = f5 + f0;
    heapClassInst.heapFloat[r0 + numDefine5] = f0;
  }
  f0 = heapClassInst.heapFloat[r3 + numDefine2];
  if (f0 <= f7) {
    f0 = f3 + f0;
    heapClassInst.heapFloat[r0 + numDefine2] = f0;
  } else {
    f0 = f1 + f0;
    heapClassInst.heapFloat[r0 + numDefine6] = f0;
  }
  heapClassInst.heap32[g0] = r2;
  heapClassInst.heap32[g0 + 1] = r1;
  zl10removeleafP6btDbvtP10btDbvtNode(i7);
  r3 = commonVariable.rg0;
  repeat22: do {
    if (r3 !== 0) {
      r5 = r2 >> numDefine2;
      r6 = heapClassInst.heap32[r5 + numDefine2];
      if (r6 < 0) {
        r5 = heapClassInst.heap32[r5];
      } else {
        r7 = -1;
        repeat27: while (true) {
          r5 = r3;
          r7 = (r7 + 1) | 0;
          if (r6 > r7) {
            r3 = r5 >> numDefine2;
            r3 = heapClassInst.heap32[r3 + numDefine8];
            if (r3 === 0) {
              break repeat22;
            } else {
              continue repeat27;
            }
          } else {
            break repeat22;
          }
        }
      }
    } else {
      r5 = 0;
    }
  } while (false);
  heapClassInst.heap32[r4] = heapClassInst.heap32[r0];
  heapClassInst.heap32[r4 + 1] = heapClassInst.heap32[r0 + 1];
  heapClassInst.heap32[r4 + numDefine2] = heapClassInst.heap32[r0 + numDefine2];
  heapClassInst.heap32[r4 + numDefine3] = heapClassInst.heap32[r0 + numDefine3];
  heapClassInst.heap32[r4 + numDefine4] = heapClassInst.heap32[r0 + numDefine4];
  heapClassInst.heap32[r4 + numDefine5] = heapClassInst.heap32[r0 + numDefine5];
  heapClassInst.heap32[r4 + numDefine6] = heapClassInst.heap32[r0 + numDefine6];
  heapClassInst.heap32[r4 + numDefine7] = heapClassInst.heap32[r0 + numDefine7];
  heapClassInst.heap32[g0] = r2;
  heapClassInst.heap32[g0 + 1] = r5;
  heapClassInst.heap32[g0 + numDefine2] = r1;
  zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
  r0 = 1;
  commonVariable.rg0 = r0;
  return;
}

function zl17recursedeletenodeP6btDbvtP10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[fp];
  r2 = r0 >> numDefine2;
  r3 = heapClassInst.heap32[r2 + numDefine10];
  if (!(r3 === 0)) {
    r3 = heapClassInst.heap32[r2 + numDefine9];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = r3;
    zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
    r2 = heapClassInst.heap32[r2 + numDefine10];
    heapClassInst.heap32[g0] = r1;
    heapClassInst.heap32[g0 + 1] = r2;
    zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
  }
  r1 = r1 >> numDefine2;
  r2 = heapClassInst.heap32[r1];
  if (!(r2 !== r0)) {
    heapClassInst.heap32[r1] = 0;
  }
  r2 = heapClassInst.heap32[r1 + 1];
  if (!(r2 === 0)) {
    r3 = gNumAlignedFree;
    r3 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r3];
    r4 = (r4 + 1) | 0;
    r2 = r2 >> numDefine2;
    heapClassInst.heap32[r3] = r4;
    r2 = heapClassInst.heap32[r2 + -1];
    heapClassInst.heap32[g0] = r2;
    free(i7);
  }
  heapClassInst.heap32[r1 + 1] = r0;
  return;
}

function zn6btDbvt19optimizeIncrementalEi(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[fp];
  if (r0 < 0) {
    r0 = r1 >> numDefine2;
    r0 = heapClassInst.heap32[r0 + numDefine3];
  }
  r2 = r1 >> numDefine2;
  r3 = heapClassInst.heap32[r2];
  repeat4: do {
    if (!(r3 === 0)) {
      if (!(r0 < 1)) {
        repeat6: while (true) {
          r3 = 0;
          r4 = r1;
          repeat8: while (true) {
            r4 = r4 >> numDefine2;
            r4 = heapClassInst.heap32[r4];
            r5 = r4 >> numDefine2;
            r6 = heapClassInst.heap32[r5 + numDefine10];
            if (r6 !== 0) {
              r6 = heapClassInst.heap32[r5 + numDefine8];
              if (uint(r6) > uint(r4)) {
                r7 = r6 >> numDefine2;
                r8 = heapClassInst.heap32[r7 + numDefine10];
                r8 = r8 === r4 ? 1 : 0;
                r8 = r8 & 1;
                r9 = (r6 + numDefine36) | 0;
                r10 = r8 << numDefine2;
                r11 = (r9 + r10) | 0;
                r11 = r11 >> numDefine2;
                r11 = heapClassInst.heap32[r11];
                if (r11 === r4) {
                  r8 = r8 ^ 1;
                  r8 = r8 << numDefine2;
                  r9 = (r9 + r8) | 0;
                  r9 = r9 >> numDefine2;
                  r9 = heapClassInst.heap32[r9];
                  r11 = heapClassInst.heap32[r7 + numDefine8];
                  if (r11 === 0) {
                    heapClassInst.heap32[r2] = r4;
                  } else {
                    r12 = r11 >> numDefine2;
                    r12 = heapClassInst.heap32[r12 + numDefine10];
                    r12 = r12 === r6 ? 1 : 0;
                    r12 = r12 & 1;
                    r12 = r12 << numDefine2;
                    r12 = (r11 + r12) | 0;
                    r12 = r12 >> numDefine2;
                    heapClassInst.heap32[r12 + numDefine9] = r4;
                  }
                  r12 = r9 >> numDefine2;
                  heapClassInst.heap32[r12 + numDefine8] = r4;
                  heapClassInst.heap32[r7 + numDefine8] = r4;
                  heapClassInst.heap32[r5 + numDefine8] = r11;
                  r11 = heapClassInst.heap32[r5 + numDefine9];
                  heapClassInst.heap32[r7 + numDefine9] = r11;
                  r11 = heapClassInst.heap32[r5 + numDefine10];
                  heapClassInst.heap32[r7 + numDefine10] = r11;
                  r11 = heapClassInst.heap32[r5 + numDefine9];
                  r11 = r11 >> numDefine2;
                  heapClassInst.heap32[r11 + numDefine8] = r6;
                  r11 = heapClassInst.heap32[r5 + numDefine10];
                  r4 = (r4 + numDefine36) | 0;
                  r10 = (r4 + r10) | 0;
                  r11 = r11 >> numDefine2;
                  r4 = (r4 + r8) | 0;
                  r8 = r10 >> numDefine2;
                  heapClassInst.heap32[r11 + numDefine8] = r6;
                  r4 = r4 >> numDefine2;
                  heapClassInst.heap32[r8] = r6;
                  heapClassInst.heap32[r4] = r9;
                  f0 = heapClassInst.heapFloat[r7 + numDefine7];
                  f1 = heapClassInst.heapFloat[r7 + numDefine6];
                  f2 = heapClassInst.heapFloat[r7 + numDefine5];
                  f3 = heapClassInst.heapFloat[r7 + numDefine4];
                  f4 = heapClassInst.heapFloat[r7 + numDefine3];
                  f5 = heapClassInst.heapFloat[r7 + numDefine2];
                  f6 = heapClassInst.heapFloat[r7 + 1];
                  f7 = heapClassInst.heapFloat[r7];
                  heapClassInst.heap32[r7] = heapClassInst.heap32[r5];
                  heapClassInst.heap32[r7 + 1] = heapClassInst.heap32[r5 + 1];
                  heapClassInst.heap32[r7 + numDefine2] = heapClassInst.heap32[r5 + numDefine2];
                  heapClassInst.heap32[r7 + numDefine3] = heapClassInst.heap32[r5 + numDefine3];
                  heapClassInst.heap32[r7 + numDefine4] = heapClassInst.heap32[r5 + numDefine4];
                  heapClassInst.heap32[r7 + numDefine5] = heapClassInst.heap32[r5 + numDefine5];
                  heapClassInst.heap32[r7 + numDefine6] = heapClassInst.heap32[r5 + numDefine6];
                  heapClassInst.heap32[r7 + numDefine7] = heapClassInst.heap32[r5 + numDefine7];
                  heapClassInst.heapFloat[r5] = f7;
                  heapClassInst.heapFloat[r5 + 1] = f6;
                  heapClassInst.heapFloat[r5 + numDefine2] = f5;
                  heapClassInst.heapFloat[r5 + numDefine3] = f4;
                  heapClassInst.heapFloat[r5 + numDefine4] = f3;
                  heapClassInst.heapFloat[r5 + numDefine5] = f2;
                  heapClassInst.heapFloat[r5 + numDefine6] = f1;
                  heapClassInst.heapFloat[r5 + numDefine7] = f0;
                } else {
                  break repeat6;
                }
              } else {
                r6 = r4;
              }
              r4 = heapClassInst.heap32[r2 + numDefine4];
              r4 = r4 >>> r3;
              r4 = r4 & 1;
              r4 = r4 << numDefine2;
              r4 = (r6 + r4) | 0;
              r3 = (r3 + 1) | 0;
              r4 = (r4 + numDefine36) | 0;
              r3 = r3 & numDefine31;
            } else {
              break repeat8;
            }
          }
          heapClassInst.heap32[g0] = r1;
          heapClassInst.heap32[g0 + 1] = r4;
          zl10removeleafP6btDbvtP10btDbvtNode(i7);
          r3 = commonVariable.rg0;
          if (r3 !== 0) {
            r3 = heapClassInst.heap32[r2];
          } else {
            r3 = 0;
          }
          heapClassInst.heap32[g0] = r1;
          heapClassInst.heap32[g0 + 1] = r3;
          heapClassInst.heap32[g0 + numDefine2] = r4;
          zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
          r3 = heapClassInst.heap32[r2 + numDefine4];
          r0 = (r0 + -1) | 0;
          r3 = (r3 + 1) | 0;
          heapClassInst.heap32[r2 + numDefine4] = r3;
          if (!(r0 !== 0)) {
            break repeat4;
          }
        }
        r4 = twoEStr22;
        r0 = twoEStr1118;
        heapClassInst.heap32[g0] = r4;
        heapClassInst.heap32[g0 + 1] = r0;
        heapClassInst.heap32[g0 + numDefine2] = numDefine379;
        assertNew(i7);
      }
    }
  } while (false);
  return;
}

function zn18btDbvtTreeColliderD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv18btDbvtTreeCollider;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zn18btDbvtTreeColliderD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv18btDbvtTreeCollider;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn18btDbvtTreeCollider7ProcessEPK10btDbvtNodeS2(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[fp + numDefine2];
  if (!(r0 === r1)) {
    r2 = heapClassInst.heap32[fp];
    r2 = r2 >> numDefine2;
    r3 = heapClassInst.heap32[r2 + 1];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine24];
    r4 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r4];
    r4 = r4 >> numDefine2;
    r1 = r1 >> numDefine2;
    r0 = r0 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + numDefine2];
    r1 = heapClassInst.heap32[r1 + numDefine9];
    r0 = heapClassInst.heap32[r0 + numDefine9];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r0;
    heapClassInst.heap32[g0 + numDefine2] = r1;
    functionTable[r4 >> numDefine2](i7);
    r0 = heapClassInst.heap32[r2 + 1];
    r0 = r0 >> numDefine2;
    r1 = heapClassInst.heap32[r0 + numDefine30];
    r1 = (r1 + 1) | 0;
    heapClassInst.heap32[r0 + numDefine30] = r1;
  }
  return;
}

function zn18btDbvtTreeCollider7ProcessEPK10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r1];
  r1 = heapClassInst.heap32[r1 + numDefine2];
  r2 = r2 >> numDefine2;
  r1 = r1 >> numDefine2;
  r2 = heapClassInst.heap32[r2 + numDefine2];
  r1 = heapClassInst.heap32[r1 + numDefine12];
  r3 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r3;
  heapClassInst.heap32[g0 + numDefine2] = r1;
  functionTable[r2 >> numDefine2](i7);
  return;
}

function znk16btDbvtBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[fp + numDefine2];
  r0 = r0 >> numDefine2;
  r1 = r1 >> numDefine2;
  heapClassInst.heap32[r1] = heapClassInst.heap32[r0 + numDefine4];
  heapClassInst.heap32[r1 + 1] = heapClassInst.heap32[r0 + numDefine5];
  r2 = heapClassInst.heap32[fp + numDefine3];
  heapClassInst.heap32[r1 + numDefine2] = heapClassInst.heap32[r0 + numDefine6];
  r2 = r2 >> numDefine2;
  heapClassInst.heap32[r1 + numDefine3] = heapClassInst.heap32[r0 + numDefine7];
  heapClassInst.heap32[r2] = heapClassInst.heap32[r0 + numDefine8];
  heapClassInst.heap32[r2 + 1] = heapClassInst.heap32[r0 + numDefine9];
  heapClassInst.heap32[r2 + numDefine2] = heapClassInst.heap32[r0 + numDefine10];
  heapClassInst.heap32[r2 + numDefine3] = heapClassInst.heap32[r0 + numDefine11];
  return;
}

function zn19BroadphaseRayTesterD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv19BroadphaseRayTester;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zn19BroadphaseRayTesterD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv19BroadphaseRayTester;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn19BroadphaseRayTester7ProcessEPK10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + 1];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[r1];
  r1 = r1 >> numDefine2;
  r2 = r2 >> numDefine2;
  r1 = heapClassInst.heap32[r1 + numDefine2];
  r2 = heapClassInst.heap32[r2 + numDefine9];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r2;
  functionTable[r1 >> numDefine2](i7);
  return;
}

function zn20BroadphaseAabbTesterD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20BroadphaseAabbTester;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zn20BroadphaseAabbTesterD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv20BroadphaseAabbTester;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn20BroadphaseAabbTester7ProcessEPK10btDbvtNode(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + 1];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[r1];
  r1 = r1 >> numDefine2;
  r2 = r2 >> numDefine2;
  r1 = heapClassInst.heap32[r1 + numDefine2];
  r2 = heapClassInst.heap32[r2 + numDefine9];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r2;
  functionTable[r1 >> numDefine2](i7);
  return;
}

function zn16btDbvtBroadphase23getOverlappingPairCacheEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine24];
  commonVariable.rg0 = r0;
  return;
}

function znk16btDbvtBroadphase23getOverlappingPairCacheEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine24];
  commonVariable.rg0 = r0;
  return;
}

function znk16btDbvtBroadphase17getBroadphaseAabbER9btVector3S1(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let f8: number = 0.0;
  let f9: number = 0.0;
  let f10: number = 0.0;
  let f11: number = 0.0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0 + 1];
  r2 = heapClassInst.heap32[fp + 1];
  r3 = heapClassInst.heap32[fp + numDefine2];
  r0 = heapClassInst.heap32[r0 + numDefine11];
  if (r1 === 0) {
    if (r0 !== 0) {
      r0 = r0 >> numDefine2;
      f0 = heapClassInst.heapFloat[r0];
      f2 = heapClassInst.heapFloat[r0 + 1];
      f4 = heapClassInst.heapFloat[r0 + numDefine2];
      f6 = heapClassInst.heapFloat[r0 + numDefine3];
      f1 = heapClassInst.heapFloat[r0 + numDefine4];
      f3 = heapClassInst.heapFloat[r0 + numDefine5];
      f5 = heapClassInst.heapFloat[r0 + numDefine6];
      f7 = heapClassInst.heapFloat[r0 + numDefine7];
    } else {
      f6 = 0;
      f4 = f6;
      f2 = f6;
      f0 = f6;
      f1 = f6;
      f3 = f6;
      f5 = f6;
      f7 = f6;
    }
  } else {
    if (r0 === 0) {
      r0 = r1 >> numDefine2;
      f0 = heapClassInst.heapFloat[r0];
      f2 = heapClassInst.heapFloat[r0 + 1];
      f4 = heapClassInst.heapFloat[r0 + numDefine2];
      f6 = heapClassInst.heapFloat[r0 + numDefine3];
      f1 = heapClassInst.heapFloat[r0 + numDefine4];
      f3 = heapClassInst.heapFloat[r0 + numDefine5];
      f5 = heapClassInst.heapFloat[r0 + numDefine6];
      f7 = heapClassInst.heapFloat[r0 + numDefine7];
    } else {
      r1 = r1 >> numDefine2;
      r0 = r0 >> numDefine2;
      f0 = heapClassInst.heapFloat[r1];
      f1 = heapClassInst.heapFloat[r0];
      f2 = heapClassInst.heapFloat[r1 + numDefine4];
      f3 = heapClassInst.heapFloat[r0 + numDefine4];
      f4 = heapClassInst.heapFloat[r1 + 1];
      f5 = heapClassInst.heapFloat[r0 + 1];
      f6 = heapClassInst.heapFloat[r1 + numDefine5];
      f7 = heapClassInst.heapFloat[r0 + numDefine5];
      f8 = heapClassInst.heapFloat[r1 + numDefine2];
      f9 = heapClassInst.heapFloat[r0 + numDefine2];
      f10 = heapClassInst.heapFloat[r1 + numDefine6];
      f11 = heapClassInst.heapFloat[r0 + numDefine6];
      f0 = f0 < f1 ? f0 : f1;
      f1 = f2 > f3 ? f2 : f3;
      f2 = f4 < f5 ? f4 : f5;
      f3 = f6 > f7 ? f6 : f7;
      f4 = f8 < f9 ? f8 : f9;
      f5 = f10 > f11 ? f10 : f11;
    }
  }
  r0 = r2 >> numDefine2;
  heapClassInst.heapFloat[r0] = f0;
  heapClassInst.heapFloat[r0 + 1] = f2;
  heapClassInst.heapFloat[r0 + numDefine2] = f4;
  r1 = r3 >> numDefine2;
  heapClassInst.heapFloat[r0 + numDefine3] = f6;
  heapClassInst.heapFloat[r1] = f1;
  heapClassInst.heapFloat[r1 + 1] = f3;
  heapClassInst.heapFloat[r1 + numDefine2] = f5;
  heapClassInst.heapFloat[r1 + numDefine3] = f7;
  return;
}

function zn16btDbvtBroadphase10printStatsEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  return;
}

function zn16btDbvtBroadphase9resetPoolEP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = 0;
  r3 = heapClassInst.heap32[r1 + numDefine14];
  r4 = heapClassInst.heap32[r1 + numDefine4];
  r3 = (r2 - r3) | 0;
  if (!(r4 !== r3)) {
    r3 = heapClassInst.heap32[r1 + 1];
    if (!(r3 === 0)) {
      r4 = (r0 + numDefine4) | 0;
      heapClassInst.heap32[g0] = r4;
      heapClassInst.heap32[g0 + 1] = r3;
      zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
    }
    r3 = heapClassInst.heap32[r1 + numDefine2];
    if (!(r3 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r1 + numDefine2] = 0;
    heapClassInst.heap32[r1 + numDefine3] = -1;
    r3 = heapClassInst.heap32[r1 + numDefine9];
    if (!(r3 === 0)) {
      r4 = heapClassInst.heapU8[r0 + numDefine40];
      if (!(r4 === 0)) {
        r4 = gNumAlignedFree;
        r4 = r4 >> numDefine2;
        r5 = heapClassInst.heap32[r4];
        r5 = (r5 + 1) | 0;
        r3 = r3 >> numDefine2;
        heapClassInst.heap32[r4] = r5;
        r3 = heapClassInst.heap32[r3 + -1];
        heapClassInst.heap32[g0] = r3;
        free(i7);
      }
      heapClassInst.heap32[r1 + numDefine9] = 0;
    }
    r3 = 1;
    heapClassInst.heap8[r0 + numDefine40] = r3;
    heapClassInst.heap32[r1 + numDefine9] = 0;
    heapClassInst.heap32[r1 + numDefine7] = 0;
    heapClassInst.heap32[r1 + numDefine8] = 0;
    heapClassInst.heap32[r1 + numDefine5] = 0;
    r4 = heapClassInst.heap32[r1 + numDefine11];
    if (!(r4 === 0)) {
      r5 = (r0 + numDefine44) | 0;
      heapClassInst.heap32[g0] = r5;
      heapClassInst.heap32[g0 + 1] = r4;
      zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
    }
    r4 = heapClassInst.heap32[r1 + numDefine12];
    if (!(r4 === 0)) {
      r5 = gNumAlignedFree;
      r5 = r5 >> numDefine2;
      r6 = heapClassInst.heap32[r5];
      r6 = (r6 + 1) | 0;
      r4 = r4 >> numDefine2;
      heapClassInst.heap32[r5] = r6;
      r4 = heapClassInst.heap32[r4 + -1];
      heapClassInst.heap32[g0] = r4;
      free(i7);
    }
    heapClassInst.heap32[r1 + numDefine12] = 0;
    heapClassInst.heap32[r1 + numDefine13] = -1;
    r4 = heapClassInst.heap32[r1 + numDefine19];
    if (!(r4 === 0)) {
      r5 = heapClassInst.heapU8[r0 + numDefine80];
      if (!(r5 === 0)) {
        r5 = gNumAlignedFree;
        r5 = r5 >> numDefine2;
        r6 = heapClassInst.heap32[r5];
        r6 = (r6 + 1) | 0;
        r4 = r4 >> numDefine2;
        heapClassInst.heap32[r5] = r6;
        r4 = heapClassInst.heap32[r4 + -1];
        heapClassInst.heap32[g0] = r4;
        free(i7);
      }
      heapClassInst.heap32[r1 + numDefine19] = 0;
    }
    heapClassInst.heap8[r0 + numDefine80] = r3;
    heapClassInst.heap32[r1 + numDefine19] = 0;
    heapClassInst.heap32[r1 + numDefine17] = 0;
    heapClassInst.heap32[r1 + numDefine18] = 0;
    heapClassInst.heap32[r1 + numDefine15] = 0;
    heapClassInst.heap8[r0 + numDefine153] = r2;
    heapClassInst.heap8[r0 + numDefine154] = r3;
    heapClassInst.heap32[r1 + numDefine26] = 0;
    heapClassInst.heap32[r1 + numDefine31] = 0;
    heapClassInst.heap32[r1 + numDefine27] = 1;
    heapClassInst.heap32[r1 + numDefine28] = 0;
    heapClassInst.heap32[r1 + numDefine29] = numDefine10;
    heapClassInst.heap32[r1 + numDefine30] = 1;
    heapClassInst.heap32[r1 + numDefine32] = 0;
    heapClassInst.heap32[r1 + numDefine33] = 0;
    heapClassInst.heap32[r1 + numDefine34] = 0;
    heapClassInst.heap32[r1 + numDefine37] = 0;
    heapClassInst.heap32[r1 + numDefine35] = 0;
    heapClassInst.heap32[r1 + numDefine36] = 0;
    heapClassInst.heap32[r1 + numDefine21] = 0;
    heapClassInst.heap32[r1 + numDefine22] = 0;
    heapClassInst.heap32[r1 + numDefine23] = 0;
  }
  return;
}

function zn6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2RNS8ICollideE(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let r15: number = 0;
  let r16: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  repeat1: do {
    if (!(r0 === 0)) {
      r1 = heapClassInst.heap32[fp + numDefine2];
      if (!(r1 === 0)) {
        r2 = heapClassInst.heap32[fp];
        r3 = r2 >> numDefine2;
        r4 = heapClassInst.heap32[r3 + numDefine6];
        if (!(r4 > numDefine127)) {
          r5 = heapClassInst.heap32[r3 + numDefine7];
          if (!(r5 > numDefine127)) {
            r5 = gNumAlignedAllocs;
            r5 = r5 >> numDefine2;
            r6 = heapClassInst.heap32[r5];
            r6 = (r6 + 1) | 0;
            heapClassInst.heap32[r5] = r6;
            heapClassInst.heap32[g0] = numDefine1043;
            mallocNew(i7);
            r5 = commonVariable.rg0;
            if (r5 !== 0) {
              r6 = 0;
              r7 = (r5 + numDefine4) | 0;
              r6 = (r6 - r7) | 0;
              r6 = r6 & numDefine15;
              r6 = (r5 + r6) | 0;
              r7 = (r6 + numDefine4) | 0;
              r6 = r6 >> numDefine2;
              heapClassInst.heap32[r6] = r5;
              r5 = r7;
            }
            r6 = (r2 + numDefine32) | 0;
            if (r4 < 1) {
              r4 = r6 >> numDefine2;
              r8 = heapClassInst.heap32[r4];
            } else {
              r7 = 0;
              repeat13: while (true) {
                r8 = r6 >> numDefine2;
                r8 = heapClassInst.heap32[r8];
                r9 = r7 << numDefine3;
                r10 = (r8 + r9) | 0;
                r10 = r10 >> numDefine2;
                r9 = (r5 + r9) | 0;
                r11 = heapClassInst.heap32[r10 + 1];
                r10 = heapClassInst.heap32[r10];
                r9 = r9 >> numDefine2;
                r7 = (r7 + 1) | 0;
                heapClassInst.heap32[r9] = r10;
                heapClassInst.heap32[r9 + 1] = r11;
                if (!(r4 !== r7)) {
                  break repeat13;
                }
              }
              r6 = (r2 + numDefine32) | 0;
            }
            if (!(r8 === 0)) {
              r4 = heapClassInst.heapU8[r2 + numDefine36];
              if (!(r4 === 0)) {
                r4 = gNumAlignedFree;
                r4 = r4 >> numDefine2;
                r7 = heapClassInst.heap32[r4];
                r7 = (r7 + 1) | 0;
                r8 = r8 >> numDefine2;
                heapClassInst.heap32[r4] = r7;
                r4 = heapClassInst.heap32[r8 + -1];
                heapClassInst.heap32[g0] = r4;
                free(i7);
              }
              r4 = r6 >> numDefine2;
              heapClassInst.heap32[r4] = 0;
            }
            r4 = 1;
            r6 = r6 >> numDefine2;
            heapClassInst.heap8[r2 + numDefine36] = r4;
            heapClassInst.heap32[r6] = r5;
            heapClassInst.heap32[r3 + numDefine7] = numDefine128;
          }
        }
        r4 = heapClassInst.heap32[fp + numDefine3];
        heapClassInst.heap32[r3 + numDefine6] = numDefine128;
        r5 = heapClassInst.heap32[r3 + numDefine8];
        r5 = r5 >> numDefine2;
        r6 = 1;
        r7 = numDefine124;
        heapClassInst.heap32[r5] = r0;
        heapClassInst.heap32[r5 + 1] = r1;
        repeat24: while (true) {
          r0 = r6;
          r6 = (r0 + -1) | 0;
          r1 = heapClassInst.heap32[r3 + numDefine8];
          r5 = r6 << numDefine3;
          r5 = (r1 + r5) | 0;
          r5 = r5 >> numDefine2;
          r8 = heapClassInst.heap32[r5];
          r5 = heapClassInst.heap32[r5 + 1];
          if (r6 > r7) {
            r7 = heapClassInst.heap32[r3 + numDefine6];
            r9 = r7 << 1;
            repeat28: do {
              if (!(r7 > r9)) {
                if (!(r7 >= r9)) {
                  r10 = heapClassInst.heap32[r3 + numDefine7];
                  if (r10 < r9) {
                    if (r9 !== 0) {
                      r10 = gNumAlignedAllocs;
                      r10 = r10 >> numDefine2;
                      r11 = heapClassInst.heap32[r10];
                      r12 = r7 << numDefine4;
                      r11 = (r11 + 1) | 0;
                      r12 = r12 | numDefine3;
                      heapClassInst.heap32[r10] = r11;
                      r10 = (r12 + numDefine16) | 0;
                      heapClassInst.heap32[g0] = r10;
                      mallocNew(i7);
                      r10 = commonVariable.rg0;
                      if (r10 !== 0) {
                        r11 = 0;
                        r12 = (r10 + numDefine4) | 0;
                        r11 = (r11 - r12) | 0;
                        r11 = r11 & numDefine15;
                        r11 = (r10 + r11) | 0;
                        r12 = (r11 + numDefine4) | 0;
                        r11 = r11 >> numDefine2;
                        heapClassInst.heap32[r11] = r10;
                        r10 = r12;
                      }
                    } else {
                      r10 = 0;
                    }
                    if (!(r7 < 1)) {
                      r11 = (r1 + numDefine4) | 0;
                      r12 = (r10 + numDefine4) | 0;
                      r13 = r7;
                      repeat40: while (true) {
                        r14 = r11 >> numDefine2;
                        r15 = heapClassInst.heap32[r14];
                        r14 = heapClassInst.heap32[r14 + -1];
                        r16 = r12 >> numDefine2;
                        r13 = (r13 + -1) | 0;
                        r11 = (r11 + numDefine8) | 0;
                        r12 = (r12 + numDefine8) | 0;
                        heapClassInst.heap32[r16 + -1] = r14;
                        heapClassInst.heap32[r16] = r15;
                        if (!(r13 !== 0)) {
                          break repeat40;
                        }
                      }
                    }
                    if (!(r1 === 0)) {
                      r11 = heapClassInst.heapU8[r2 + numDefine36];
                      if (!(r11 === 0)) {
                        r11 = gNumAlignedFree;
                        r11 = r11 >> numDefine2;
                        r12 = heapClassInst.heap32[r11];
                        r12 = (r12 + 1) | 0;
                        r1 = r1 >> numDefine2;
                        heapClassInst.heap32[r11] = r12;
                        r1 = heapClassInst.heap32[r1 + -1];
                        heapClassInst.heap32[g0] = r1;
                        free(i7);
                      }
                      heapClassInst.heap32[r3 + numDefine8] = 0;
                    }
                    r1 = 1;
                    heapClassInst.heap8[r2 + numDefine36] = r1;
                    heapClassInst.heap32[r3 + numDefine8] = r10;
                    heapClassInst.heap32[r3 + numDefine7] = r9;
                    if (!(r7 < r9)) {
                      break repeat28;
                    }
                  }
                  while (true) {
                    r7 = (r7 + -1) | 0;
                    if (!(r7 !== 0)) {
                      break repeat28;
                    }
                  }
                }
              }
            } while (false);
            r7 = (r9 + numDefineNeg4) | 0;
            heapClassInst.heap32[r3 + numDefine6] = r9;
          }
          if (r8 !== r5) {
            r1 = r8 >> numDefine2;
            r9 = r5 >> numDefine2;
            f0 = heapClassInst.heapFloat[r1];
            f1 = heapClassInst.heapFloat[r9 + numDefine4];
            if (!(f0 > f1)) {
              f0 = heapClassInst.heapFloat[r1 + numDefine4];
              f1 = heapClassInst.heapFloat[r9];
              if (!(f0 < f1)) {
                f0 = heapClassInst.heapFloat[r1 + 1];
                f1 = heapClassInst.heapFloat[r9 + numDefine5];
                if (!(f0 > f1)) {
                  f0 = heapClassInst.heapFloat[r1 + numDefine5];
                  f1 = heapClassInst.heapFloat[r9 + 1];
                  if (!(f0 < f1)) {
                    f0 = heapClassInst.heapFloat[r1 + numDefine2];
                    f1 = heapClassInst.heapFloat[r9 + numDefine6];
                    if (!(f0 > f1)) {
                      f0 = heapClassInst.heapFloat[r1 + numDefine6];
                      f1 = heapClassInst.heapFloat[r9 + numDefine2];
                      if (!(f0 < f1)) {
                        r10 = heapClassInst.heap32[r9 + numDefine10];
                        r11 = heapClassInst.heap32[r1 + numDefine10];
                        if (r11 === 0) {
                          if (r10 === 0) {
                            r0 = r4 >> numDefine2;
                            r0 = heapClassInst.heap32[r0];
                            r0 = r0 >> numDefine2;
                            r0 = heapClassInst.heap32[r0 + numDefine2];
                            heapClassInst.heap32[g0] = r4;
                            heapClassInst.heap32[g0 + 1] = r8;
                            heapClassInst.heap32[g0 + numDefine2] = r5;
                            functionTable[r0 >> numDefine2](i7);
                          } else {
                            r5 = r0 << numDefine3;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r6 = (r6 + r5) | 0;
                            r1 = heapClassInst.heap32[r9 + numDefine9];
                            r6 = r6 >> numDefine2;
                            heapClassInst.heap32[r6 + numDefineNeg2] = r8;
                            heapClassInst.heap32[r6 + -1] = r1;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r5 = (r6 + r5) | 0;
                            r1 = heapClassInst.heap32[r9 + numDefine10];
                            r5 = r5 >> numDefine2;
                            r6 = (r0 + 1) | 0;
                            heapClassInst.heap32[r5] = r8;
                            heapClassInst.heap32[r5 + 1] = r1;
                          }
                        } else {
                          r6 = heapClassInst.heap32[r3 + numDefine8];
                          if (r10 === 0) {
                            r8 = r0 << numDefine3;
                            r6 = (r6 + r8) | 0;
                            r6 = r6 >> numDefine2;
                            r9 = heapClassInst.heap32[r1 + numDefine9];
                            heapClassInst.heap32[r6 + numDefineNeg2] = r9;
                            heapClassInst.heap32[r6 + -1] = r5;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r6 = (r6 + r8) | 0;
                            r8 = heapClassInst.heap32[r1 + numDefine10];
                            r9 = r6 >> numDefine2;
                            r6 = (r0 + 1) | 0;
                            heapClassInst.heap32[r9] = r8;
                            heapClassInst.heap32[r9 + 1] = r5;
                          } else {
                            r5 = r0 << numDefine3;
                            r6 = (r6 + r5) | 0;
                            r8 = heapClassInst.heap32[r9 + numDefine9];
                            r10 = heapClassInst.heap32[r1 + numDefine9];
                            r6 = r6 >> numDefine2;
                            heapClassInst.heap32[r6 + numDefineNeg2] = r10;
                            heapClassInst.heap32[r6 + -1] = r8;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r6 = (r6 + r5) | 0;
                            r8 = heapClassInst.heap32[r9 + numDefine9];
                            r10 = heapClassInst.heap32[r1 + numDefine10];
                            r6 = r6 >> numDefine2;
                            heapClassInst.heap32[r6] = r10;
                            heapClassInst.heap32[r6 + 1] = r8;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r6 = (r5 + r6) | 0;
                            r8 = heapClassInst.heap32[r9 + numDefine10];
                            r10 = heapClassInst.heap32[r1 + numDefine9];
                            r6 = r6 >> numDefine2;
                            heapClassInst.heap32[r6 + numDefine2] = r10;
                            heapClassInst.heap32[r6 + numDefine3] = r8;
                            r6 = heapClassInst.heap32[r3 + numDefine8];
                            r6 = (r5 + r6) | 0;
                            r5 = heapClassInst.heap32[r9 + numDefine10];
                            r1 = heapClassInst.heap32[r1 + numDefine10];
                            r8 = r6 >> numDefine2;
                            r6 = (r0 + numDefine3) | 0;
                            heapClassInst.heap32[r8 + numDefine4] = r1;
                            heapClassInst.heap32[r8 + numDefine5] = r5;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          } else {
            r5 = r8 >> numDefine2;
            r8 = heapClassInst.heap32[r5 + numDefine10];
            if (r8 !== 0) {
              r6 = r0 << numDefine3;
              r8 = heapClassInst.heap32[r3 + numDefine8];
              r8 = (r8 + r6) | 0;
              r1 = heapClassInst.heap32[r5 + numDefine9];
              r8 = r8 >> numDefine2;
              heapClassInst.heap32[r8 + numDefineNeg2] = r1;
              heapClassInst.heap32[r8 + -1] = r1;
              r8 = heapClassInst.heap32[r3 + numDefine8];
              r8 = (r8 + r6) | 0;
              r1 = heapClassInst.heap32[r5 + numDefine10];
              r8 = r8 >> numDefine2;
              heapClassInst.heap32[r8] = r1;
              heapClassInst.heap32[r8 + 1] = r1;
              r8 = heapClassInst.heap32[r3 + numDefine8];
              r6 = (r6 + r8) | 0;
              r8 = heapClassInst.heap32[r5 + numDefine10];
              r5 = heapClassInst.heap32[r5 + numDefine9];
              r1 = r6 >> numDefine2;
              r6 = (r0 + numDefine2) | 0;
              heapClassInst.heap32[r1 + numDefine2] = r5;
              heapClassInst.heap32[r1 + numDefine3] = r8;
            }
          }
          if (r6 !== 0) {
            continue repeat24;
          } else {
            break repeat1;
          }
        }
      }
    }
  } while (false);
  return;
}

function zn16btDbvtBroadphase8aabbTestERK9btVector3S2R24btBroadphaseAabbCallback(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg56;
  let g0 = i7 >> numDefine2;
  r0 = ztv20BroadphaseAabbTester;
  r1 = sp + numDefineNeg8;
  r0 = (r0 + numDefine8) | 0;
  r2 = heapClassInst.heap32[fp + 1];
  r3 = r1 >> numDefine2;
  r4 = heapClassInst.heap32[fp + numDefine3];
  heapClassInst.heap32[fp + numDefineNeg2] = r0;
  r0 = sp + numDefineNeg40;
  r2 = r2 >> numDefine2;
  heapClassInst.heap32[r3 + 1] = r4;
  r3 = r0 >> numDefine2;
  heapClassInst.heap32[fp + numDefineNeg10] = heapClassInst.heap32[r2];
  heapClassInst.heap32[r3 + 1] = heapClassInst.heap32[r2 + 1];
  r4 = heapClassInst.heap32[fp + numDefine2];
  heapClassInst.heap32[r3 + numDefine2] = heapClassInst.heap32[r2 + numDefine2];
  r4 = r4 >> numDefine2;
  heapClassInst.heap32[r3 + numDefine3] = heapClassInst.heap32[r2 + numDefine3];
  heapClassInst.heap32[r3 + numDefine4] = heapClassInst.heap32[r4];
  heapClassInst.heap32[r3 + numDefine5] = heapClassInst.heap32[r4 + 1];
  r2 = heapClassInst.heap32[fp];
  heapClassInst.heap32[r3 + numDefine6] = heapClassInst.heap32[r4 + numDefine2];
  r2 = r2 >> numDefine2;
  heapClassInst.heap32[r3 + numDefine7] = heapClassInst.heap32[r4 + numDefine3];
  r3 = heapClassInst.heap32[r2 + 1];
  heapClassInst.heap32[g0] = r3;
  heapClassInst.heap32[g0 + 1] = r0;
  heapClassInst.heap32[g0 + numDefine2] = r1;
  zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE(i7);
  r2 = heapClassInst.heap32[r2 + numDefine11];
  heapClassInst.heap32[g0] = r2;
  heapClassInst.heap32[g0 + 1] = r0;
  heapClassInst.heap32[g0 + numDefine2] = r1;
  zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE(i7);
  return;
}

function zn16btDbvtBroadphase11createProxyERK9btVector3S2IPvssP12btDispatcherS3(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg64;
  let g0 = i7 >> numDefine2;
  r0 = gNumAlignedAllocs;
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0];
  r2 = (r1 + 1) | 0;
  heapClassInst.heap32[r0] = r2;
  heapClassInst.heap32[g0] = numDefine83;
  mallocNew(i7);
  r2 = commonVariable.rg0;
  r3 = heapClassInst.heap32[fp];
  r4 = heapClassInst.heap32[fp + 1];
  r5 = heapClassInst.heap32[fp + numDefine2];
  r6 = heapClassInst.heap32[fp + numDefine4];
  r7 = heapClassInst.heap32[fp + numDefine5];
  r8 = heapClassInst.heap32[fp + numDefine6];
  if (r2 !== 0) {
    r9 = 0;
    r10 = (r2 + numDefine4) | 0;
    r9 = (r9 - r10) | 0;
    r9 = r9 & numDefine15;
    r9 = (r2 + r9) | 0;
    r10 = (r9 + numDefine4) | 0;
    r9 = r9 >> numDefine2;
    heapClassInst.heap32[r9] = r2;
    r2 = r10;
  }
  r9 = r2 >> numDefine2;
  heapClassInst.heap32[r9] = r6;
  heapClassInst.heap16[(r2 + numDefine4) >> 1] = r7;
  r4 = r4 >> numDefine2;
  heapClassInst.heap16[(r2 + numDefine6) >> 1] = r8;
  f0 = heapClassInst.heapFloat[r4];
  heapClassInst.heapFloat[r9 + numDefine4] = f0;
  f1 = heapClassInst.heapFloat[r4 + 1];
  heapClassInst.heapFloat[r9 + numDefine5] = f1;
  f2 = heapClassInst.heapFloat[r4 + numDefine2];
  heapClassInst.heapFloat[r9 + numDefine6] = f2;
  f3 = heapClassInst.heapFloat[r4 + numDefine3];
  r4 = r5 >> numDefine2;
  heapClassInst.heapFloat[r9 + numDefine7] = f3;
  f4 = heapClassInst.heapFloat[r4];
  heapClassInst.heapFloat[r9 + numDefine8] = f4;
  f5 = heapClassInst.heapFloat[r4 + 1];
  heapClassInst.heapFloat[r9 + numDefine9] = f5;
  f6 = heapClassInst.heapFloat[r4 + numDefine2];
  heapClassInst.heapFloat[r9 + numDefine10] = f6;
  f7 = heapClassInst.heapFloat[r4 + numDefine3];
  heapClassInst.heapFloat[r9 + numDefine11] = f7;
  heapClassInst.heap32[r9 + numDefine2] = 0;
  heapClassInst.heap32[r9 + numDefine14] = 0;
  r4 = sp + numDefineNeg32;
  heapClassInst.heap32[r9 + numDefine13] = 0;
  r5 = r4 >> numDefine2;
  heapClassInst.heapFloat[fp + numDefineNeg8] = f0;
  heapClassInst.heapFloat[r5 + 1] = f1;
  heapClassInst.heapFloat[r5 + numDefine2] = f2;
  heapClassInst.heapFloat[r5 + numDefine3] = f3;
  heapClassInst.heapFloat[r5 + numDefine4] = f4;
  heapClassInst.heapFloat[r5 + numDefine5] = f5;
  heapClassInst.heapFloat[r5 + numDefine6] = f6;
  r6 = r3 >> numDefine2;
  heapClassInst.heapFloat[r5 + numDefine7] = f7;
  r5 = heapClassInst.heap32[r6 + numDefine26];
  heapClassInst.heap32[r9 + numDefine15] = r5;
  r5 = heapClassInst.heap32[r6 + numDefine37];
  r5 = (r5 + 1) | 0;
  heapClassInst.heap32[r6 + numDefine37] = r5;
  heapClassInst.heap32[r9 + numDefine3] = r5;
  r5 = heapClassInst.heap32[r6 + numDefine2];
  r7 = (r3 + numDefine4) | 0;
  if (r5 === 0) {
    r5 = (r1 + numDefine2) | 0;
    heapClassInst.heap32[r0] = r5;
    heapClassInst.heap32[g0] = numDefine63;
    mallocNew(i7);
    r5 = commonVariable.rg0;
    if (r5 !== 0) {
      r0 = 0;
      r1 = (r5 + numDefine4) | 0;
      r0 = (r0 - r1) | 0;
      r0 = r0 & numDefine15;
      r0 = (r5 + r0) | 0;
      r1 = (r0 + numDefine4) | 0;
      r0 = r0 >> numDefine2;
      heapClassInst.heap32[r0] = r5;
      r5 = r1;
    }
  } else {
    heapClassInst.heap32[r6 + numDefine2] = 0;
  }
  r0 = r5 >> numDefine2;
  heapClassInst.heap32[r0 + numDefine8] = 0;
  heapClassInst.heap32[r0 + numDefine9] = r2;
  heapClassInst.heap32[r0 + numDefine10] = 0;
  heapClassInst.heapFloat[r0] = f0;
  heapClassInst.heapFloat[r0 + 1] = f1;
  heapClassInst.heapFloat[r0 + numDefine2] = f2;
  heapClassInst.heapFloat[r0 + numDefine3] = f3;
  heapClassInst.heapFloat[r0 + numDefine4] = f4;
  heapClassInst.heapFloat[r0 + numDefine5] = f5;
  heapClassInst.heapFloat[r0 + numDefine6] = f6;
  heapClassInst.heapFloat[r0 + numDefine7] = f7;
  r0 = heapClassInst.heap32[r6 + 1];
  heapClassInst.heap32[g0] = r7;
  heapClassInst.heap32[g0 + 1] = r0;
  heapClassInst.heap32[g0 + numDefine2] = r5;
  zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
  r0 = heapClassInst.heap32[r6 + numDefine4];
  r0 = (r0 + 1) | 0;
  heapClassInst.heap32[r6 + numDefine4] = r0;
  heapClassInst.heap32[r9 + numDefine12] = r5;
  r0 = heapClassInst.heap32[r6 + numDefine26];
  r0 = r0 << numDefine2;
  r0 = (r3 + r0) | 0;
  r0 = r0 >> numDefine2;
  heapClassInst.heap32[r9 + numDefine13] = 0;
  r1 = heapClassInst.heap32[r0 + numDefine21];
  heapClassInst.heap32[r9 + numDefine14] = r1;
  if (!(r1 === 0)) {
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r1 + numDefine13] = r2;
  }
  heapClassInst.heap32[r0 + numDefine21] = r2;
  r0 = heapClassInst.heapU8[r3 + numDefine153];
  if (!(r0 !== 0)) {
    r0 = ztv18btDbvtTreeCollider;
    r0 = (r0 + numDefine8) | 0;
    r1 = sp + numDefineNeg48;
    r5 = r1 >> numDefine2;
    heapClassInst.heap32[fp + numDefineNeg12] = r0;
    heapClassInst.heap32[r5 + 1] = r3;
    heapClassInst.heap32[r5 + numDefine2] = r2;
    r3 = heapClassInst.heap32[r6 + 1];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r4;
    heapClassInst.heap32[g0 + numDefine2] = r1;
    zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE(i7);
    r3 = heapClassInst.heap32[r6 + numDefine11];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r4;
    heapClassInst.heap32[g0 + numDefine2] = r1;
    zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE(i7);
    heapClassInst.heap32[fp + numDefineNeg12] = r0;
  }
  commonVariable.rg0 = r2;
  return;
}

function znk6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5S5PjfS5S5RNS8ICollideE(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let r15: number = 0;
  let r16: number = 0;
  let r17: number = 0;
  let r18: number = 0;
  let r19: number = 0;
  let r20: number = 0;
  let r21: number = 0;
  let r22: number = 0;
  let r23: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let f8: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg40;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  if (!(r0 === 0)) {
    r1 = heapClassInst.heap32[fp + 1];
    r2 = heapClassInst.heap32[fp + numDefine2];
    r3 = heapClassInst.heap32[fp + numDefine3];
    f0 = heapClassInst.heapFloat[fp + numDefine4];
    r4 = heapClassInst.heap32[fp + numDefine5];
    r5 = heapClassInst.heap32[fp + numDefine6];
    r6 = heapClassInst.heap32[fp + numDefine7];
    r7 = gNumAlignedAllocs;
    r7 = r7 >> numDefine2;
    r8 = heapClassInst.heap32[r7];
    r8 = (r8 + 1) | 0;
    heapClassInst.heap32[r7] = r8;
    heapClassInst.heap32[g0] = numDefine531;
    mallocNew(i7);
    r8 = commonVariable.rg0;
    if (r8 !== 0) {
      r9 = 0;
      r10 = (r8 + numDefine4) | 0;
      r9 = (r9 - r10) | 0;
      r9 = r9 & numDefine15;
      r9 = (r8 + r9) | 0;
      r10 = (r9 + numDefine4) | 0;
      r9 = r9 >> numDefine2;
      heapClassInst.heap32[r9] = r8;
      r8 = r10;
    }
    r9 = 0;
    repeat6: while (true) {
      r10 = r9 << numDefine2;
      r10 = (r8 + r10) | 0;
      r9 = (r9 + 1) | 0;
      r10 = r10 >> numDefine2;
      heapClassInst.heap32[r10] = 0;
      if (!(r9 !== numDefine128)) {
        break repeat6;
      }
    }
    r9 = numDefine128;
    r10 = 1;
    r11 = numDefine126;
    r12 = r8 >> numDefine2;
    heapClassInst.heap32[r12] = r0;
    r0 = r9;
    r12 = r10;
    repeat9: while (true) {
      r13 = r12;
      r12 = (r13 + -1) | 0;
      r14 = r12 << numDefine2;
      r14 = (r8 + r14) | 0;
      r14 = r14 >> numDefine2;
      r14 = heapClassInst.heap32[r14];
      r15 = r14 >> numDefine2;
      r16 = r5 >> numDefine2;
      f1 = heapClassInst.heapFloat[r15 + numDefine2];
      f2 = heapClassInst.heapFloat[r16 + numDefine2];
      f3 = heapClassInst.heapFloat[r15 + 1];
      f4 = heapClassInst.heapFloat[r16 + 1];
      f5 = heapClassInst.heapFloat[r15];
      f6 = heapClassInst.heapFloat[r16];
      r16 = sp + numDefineNeg32;
      f5 = f5 - f6;
      r17 = r16 >> numDefine2;
      f3 = f3 - f4;
      heapClassInst.heapFloat[fp + numDefineNeg8] = f5;
      f1 = f1 - f2;
      heapClassInst.heapFloat[r17 + 1] = f3;
      heapClassInst.heapFloat[r17 + numDefine2] = f1;
      heapClassInst.heap32[r17 + numDefine3] = 0;
      r18 = r4 >> numDefine2;
      f1 = heapClassInst.heapFloat[r15 + numDefine6];
      f2 = heapClassInst.heapFloat[r18 + numDefine2];
      f3 = heapClassInst.heapFloat[r15 + numDefine5];
      f4 = heapClassInst.heapFloat[r18 + 1];
      f5 = heapClassInst.heapFloat[r15 + numDefine4];
      f6 = heapClassInst.heapFloat[r18];
      f5 = f5 - f6;
      f3 = f3 - f4;
      heapClassInst.heapFloat[r17 + numDefine4] = f5;
      f1 = f1 - f2;
      heapClassInst.heapFloat[r17 + numDefine5] = f3;
      heapClassInst.heapFloat[r17 + numDefine6] = f1;
      r18 = r3 >> numDefine2;
      heapClassInst.heap32[r17 + numDefine7] = 0;
      r17 = heapClassInst.heap32[r18];
      r19 = heapClassInst.heap32[r18 + 1];
      r20 = (r10 - r19) | 0;
      r21 = r17 << numDefine4;
      r20 = r20 << numDefine4;
      r21 = (r16 + r21) | 0;
      r20 = (r16 + r20) | 0;
      r22 = r1 >> numDefine2;
      r21 = r21 >> numDefine2;
      r20 = r20 >> numDefine2;
      r23 = r2 >> numDefine2;
      f1 = heapClassInst.heapFloat[r21];
      f2 = heapClassInst.heapFloat[r22];
      f3 = heapClassInst.heapFloat[r20 + 1];
      f4 = heapClassInst.heapFloat[r22 + 1];
      f1 = f1 - f2;
      f5 = heapClassInst.heapFloat[r23];
      f3 = f3 - f4;
      f6 = heapClassInst.heapFloat[r23 + 1];
      f1 = f1 * f5;
      f3 = f3 * f6;
      if (!(f1 > f3)) {
        r17 = (r10 - r17) | 0;
        r17 = r17 << numDefine4;
        r19 = r19 << numDefine4;
        r17 = (r16 + r17) | 0;
        r19 = (r16 + r19) | 0;
        r17 = r17 >> numDefine2;
        r19 = r19 >> numDefine2;
        f7 = heapClassInst.heapFloat[r17];
        f8 = heapClassInst.heapFloat[r19 + 1];
        f2 = f7 - f2;
        f4 = f8 - f4;
        f2 = f2 * f5;
        f4 = f4 * f6;
        if (f4 <= f2) {
          r17 = heapClassInst.heap32[r18 + numDefine2];
          r18 = 1;
          r18 = (r18 - r17) | 0;
          r18 = r18 << numDefine4;
          r18 = (r16 + r18) | 0;
          r18 = r18 >> numDefine2;
          f5 = heapClassInst.heapFloat[r18 + numDefine2];
          f6 = heapClassInst.heapFloat[r22 + numDefine2];
          f5 = f5 - f6;
          f7 = heapClassInst.heapFloat[r23 + numDefine2];
          f1 = f1 < f4 ? f4 : f1;
          f4 = f5 * f7;
          if (!(f1 > f4)) {
            r17 = r17 << numDefine4;
            r16 = (r16 + r17) | 0;
            r16 = r16 >> numDefine2;
            f5 = heapClassInst.heapFloat[r16 + numDefine2];
            f5 = f5 - f6;
            f2 = f3 < f2 ? f3 : f2;
            f3 = f5 * f7;
            if (!(f3 > f2)) {
              f1 = f1 < f3 ? f3 : f1;
              if (!(f1 >= f0)) {
                f1 = f4 < f2 ? f4 : f2;
                f2 = 0;
                if (!(f1 <= f2)) {
                  r16 = heapClassInst.heap32[r15 + numDefine10];
                  if (r16 === 0) {
                    r13 = r6 >> numDefine2;
                    r13 = heapClassInst.heap32[r13];
                    r13 = r13 >> numDefine2;
                    r13 = heapClassInst.heap32[r13 + numDefine3];
                    heapClassInst.heap32[g0] = r6;
                    heapClassInst.heap32[g0 + 1] = r14;
                    functionTable[r13 >> numDefine2](i7);
                  } else {
                    if (r12 > r11) {
                      r14 = r0 << 1;
                      repeat23: do {
                        if (r0 <= r14) {
                          if (!(r0 >= r14)) {
                            if (r9 < r14) {
                              if (r14 !== 0) {
                                r9 = heapClassInst.heap32[r7];
                                r11 = r0 << numDefine3;
                                r9 = (r9 + 1) | 0;
                                r11 = r11 | numDefine3;
                                heapClassInst.heap32[r7] = r9;
                                r9 = (r11 + numDefine16) | 0;
                                heapClassInst.heap32[g0] = r9;
                                mallocNew(i7);
                                r9 = commonVariable.rg0;
                                if (r9 !== 0) {
                                  r11 = 0;
                                  r12 = (r9 + numDefine4) | 0;
                                  r11 = (r11 - r12) | 0;
                                  r11 = r11 & numDefine15;
                                  r11 = (r9 + r11) | 0;
                                  r12 = (r11 + numDefine4) | 0;
                                  r11 = r11 >> numDefine2;
                                  heapClassInst.heap32[r11] = r9;
                                  r9 = r12;
                                }
                              } else {
                                r9 = 0;
                              }
                              if (!(r0 < 1)) {
                                r11 = r8;
                                r12 = r9;
                                r16 = r0;
                                repeat35: while (true) {
                                  r17 = r11 >> numDefine2;
                                  r16 = (r16 + -1) | 0;
                                  r18 = (r12 + numDefine4) | 0;
                                  r11 = (r11 + numDefine4) | 0;
                                  r12 = r12 >> numDefine2;
                                  r17 = heapClassInst.heap32[r17];
                                  heapClassInst.heap32[r12] = r17;
                                  r12 = r18;
                                  if (!(r16 !== 0)) {
                                    break repeat35;
                                  }
                                }
                              }
                              if (!(r8 === 0)) {
                                r11 = gNumAlignedFree;
                                r11 = r11 >> numDefine2;
                                r12 = heapClassInst.heap32[r11];
                                r12 = (r12 + 1) | 0;
                                r8 = r8 >> numDefine2;
                                heapClassInst.heap32[r11] = r12;
                                r8 = heapClassInst.heap32[r8 + -1];
                                heapClassInst.heap32[g0] = r8;
                                free(i7);
                              }
                              if (r0 < r14) {
                                r8 = r9;
                                r9 = r14;
                              } else {
                                r8 = r9;
                                r9 = r14;
                                break repeat23;
                              }
                            }
                            r11 = r0;
                            while (true) {
                              r12 = r0 << numDefine2;
                              r12 = (r8 + r12) | 0;
                              r11 = (r11 + -1) | 0;
                              r0 = (r0 + 1) | 0;
                              r12 = r12 >> numDefine2;
                              heapClassInst.heap32[r12] = 0;
                              if (!(r11 !== 0)) {
                                break repeat23;
                              }
                            }
                          }
                        }
                      } while (false);
                      r11 = (r14 + numDefineNeg2) | 0;
                    } else {
                      r14 = r0;
                    }
                    r0 = r13 << numDefine2;
                    r0 = (r8 + r0) | 0;
                    r0 = r0 >> numDefine2;
                    r12 = heapClassInst.heap32[r15 + numDefine9];
                    heapClassInst.heap32[r0 + -1] = r12;
                    r15 = heapClassInst.heap32[r15 + numDefine10];
                    r12 = (r13 + 1) | 0;
                    heapClassInst.heap32[r0] = r15;
                    r0 = r14;
                  }
                }
              }
            }
          }
        }
      }
      if (!(r12 !== 0)) {
        break repeat9;
      }
    }
    if (!(r8 === 0)) {
      r0 = gNumAlignedFree;
      r0 = r0 >> numDefine2;
      r1 = heapClassInst.heap32[r0];
      r1 = (r1 + 1) | 0;
      r2 = r8 >> numDefine2;
      heapClassInst.heap32[r0] = r1;
      r0 = heapClassInst.heap32[r2 + -1];
      heapClassInst.heap32[g0] = r0;
      free(i7);
    }
  }
  return;
}

function zn16btDbvtBroadphase7rayTestERK9btVector3S2R23btBroadphaseRayCallbackS2S2(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let f0: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg40;
  let g0 = i7 >> numDefine2;
  r0 = ztv19BroadphaseRayTester;
  r1 = sp + numDefineNeg8;
  r0 = (r0 + numDefine8) | 0;
  r2 = heapClassInst.heap32[fp + numDefine3];
  r3 = heapClassInst.heap32[fp];
  r4 = r1 >> numDefine2;
  heapClassInst.heap32[fp + numDefineNeg2] = r0;
  heapClassInst.heap32[r4 + 1] = r2;
  r0 = r2 >> numDefine2;
  r3 = r3 >> numDefine2;
  f0 = heapClassInst.heapFloat[r0 + numDefine8];
  r4 = heapClassInst.heap32[r3 + 1];
  r5 = heapClassInst.heap32[fp + 1];
  r6 = (r2 + numDefine4) | 0;
  r2 = (r2 + numDefine20) | 0;
  r7 = heapClassInst.heap32[fp + numDefine4];
  r8 = heapClassInst.heap32[fp + numDefine5];
  heapClassInst.heap32[g0] = r4;
  heapClassInst.heap32[g0 + 1] = r5;
  heapClassInst.heap32[g0 + numDefine2] = r6;
  heapClassInst.heap32[g0 + numDefine3] = r2;
  heapClassInst.heapFloat[g0 + numDefine4] = f0;
  heapClassInst.heap32[g0 + numDefine5] = r7;
  heapClassInst.heap32[g0 + numDefine6] = r8;
  heapClassInst.heap32[g0 + numDefine7] = r1;
  znk6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5S5PjfS5S5RNS8ICollideE(i7);
  f0 = heapClassInst.heapFloat[r0 + numDefine8];
  r0 = heapClassInst.heap32[r3 + numDefine11];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r5;
  heapClassInst.heap32[g0 + numDefine2] = r6;
  heapClassInst.heap32[g0 + numDefine3] = r2;
  heapClassInst.heapFloat[g0 + numDefine4] = f0;
  heapClassInst.heap32[g0 + numDefine5] = r7;
  heapClassInst.heap32[g0 + numDefine6] = r8;
  heapClassInst.heap32[g0 + numDefine7] = r1;
  znk6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5S5PjfS5S5RNS8ICollideE(i7);
  return;
}

function zn16btDbvtBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[fp];
  r3 = heapClassInst.heap32[fp + numDefine2];
  r4 = heapClassInst.heap32[r1 + numDefine12];
  r5 = heapClassInst.heap32[r1 + numDefine15];
  if (r5 !== numDefine2) {
    r5 = (r2 + numDefine4) | 0;
    heapClassInst.heap32[g0] = r5;
    heapClassInst.heap32[g0 + 1] = r4;
    r5 = r2 >> numDefine2;
    zl10removeleafP6btDbvtP10btDbvtNode(i7);
    r6 = heapClassInst.heap32[r5 + numDefine2];
    if (!(r6 === 0)) {
      r7 = gNumAlignedFree;
      r7 = r7 >> numDefine2;
      r8 = heapClassInst.heap32[r7];
      r8 = (r8 + 1) | 0;
      r6 = r6 >> numDefine2;
      heapClassInst.heap32[r7] = r8;
      r6 = heapClassInst.heap32[r6 + -1];
      heapClassInst.heap32[g0] = r6;
      free(i7);
    }
    heapClassInst.heap32[r5 + numDefine2] = r4;
    r4 = heapClassInst.heap32[r5 + numDefine4];
    r4 = (r4 + -1) | 0;
    heapClassInst.heap32[r5 + numDefine4] = r4;
  } else {
    r5 = (r2 + numDefine44) | 0;
    heapClassInst.heap32[g0] = r5;
    heapClassInst.heap32[g0 + 1] = r4;
    r5 = r2 >> numDefine2;
    zl10removeleafP6btDbvtP10btDbvtNode(i7);
    r6 = heapClassInst.heap32[r5 + numDefine12];
    if (!(r6 === 0)) {
      r7 = gNumAlignedFree;
      r7 = r7 >> numDefine2;
      r8 = heapClassInst.heap32[r7];
      r8 = (r8 + 1) | 0;
      r6 = r6 >> numDefine2;
      heapClassInst.heap32[r7] = r8;
      r6 = heapClassInst.heap32[r6 + -1];
      heapClassInst.heap32[g0] = r6;
      free(i7);
    }
    heapClassInst.heap32[r5 + numDefine12] = r4;
    r4 = heapClassInst.heap32[r5 + numDefine14];
    r4 = (r4 + -1) | 0;
    heapClassInst.heap32[r5 + numDefine14] = r4;
  }
  r4 = heapClassInst.heap32[r1 + numDefine13];
  r5 = heapClassInst.heap32[r1 + numDefine14];
  if (r4 === 0) {
    r4 = heapClassInst.heap32[r1 + numDefine15];
    r4 = r4 << numDefine2;
    r4 = (r2 + r4) | 0;
    r4 = r4 >> numDefine2;
    heapClassInst.heap32[r4 + numDefine21] = r5;
  } else {
    r4 = r4 >> numDefine2;
    heapClassInst.heap32[r4 + numDefine14] = r5;
  }
  r4 = heapClassInst.heap32[r1 + numDefine14];
  if (!(r4 === 0)) {
    r4 = r4 >> numDefine2;
    r5 = heapClassInst.heap32[r1 + numDefine13];
    heapClassInst.heap32[r4 + numDefine13] = r5;
  }
  r4 = r2 >> numDefine2;
  r4 = heapClassInst.heap32[r4 + numDefine24];
  r5 = r4 >> numDefine2;
  r5 = heapClassInst.heap32[r5];
  r5 = r5 >> numDefine2;
  r5 = heapClassInst.heap32[r5 + numDefine4];
  heapClassInst.heap32[g0] = r4;
  heapClassInst.heap32[g0 + 1] = r0;
  heapClassInst.heap32[g0 + numDefine2] = r3;
  functionTable[r5 >> numDefine2](i7);
  if (!(r0 === 0)) {
    r0 = gNumAlignedFree;
    r0 = r0 >> numDefine2;
    r3 = heapClassInst.heap32[r0];
    r3 = (r3 + 1) | 0;
    heapClassInst.heap32[r0] = r3;
    r0 = heapClassInst.heap32[r1 + -1];
    heapClassInst.heap32[g0] = r0;
    free(i7);
  }
  r0 = 1;
  heapClassInst.heap8[r2 + numDefine154] = r0;
  return;
}

function zn16btDbvtBroadphase25calculateOverlappingPairsEP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg48;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r1 + numDefine4];
  r3 = heapClassInst.heap32[r1 + numDefine28];
  r2 = (r3 * r2) | 0;
  r2 = (r2 / numDefine100) | 0;
  r3 = (r0 + numDefine4) | 0;
  r2 = (r2 + 1) | 0;
  heapClassInst.heap32[g0] = r3;
  heapClassInst.heap32[g0 + 1] = r2;
  zn6btDbvt19optimizeIncrementalEi(i7);
  r2 = heapClassInst.heap32[r1 + numDefine31];
  if (!(r2 === 0)) {
    r2 = heapClassInst.heap32[r1 + numDefine14];
    r4 = heapClassInst.heap32[r1 + numDefine27];
    r2 = (r4 * r2) | 0;
    r4 = (r2 / numDefine100) | 0;
    r5 = (r0 + numDefine44) | 0;
    r4 = (r4 + 1) | 0;
    heapClassInst.heap32[g0] = r5;
    heapClassInst.heap32[g0 + 1] = r4;
    zn6btDbvt19optimizeIncrementalEi(i7);
    r2 = (r2 / numDefineNeg100) | 0;
    r4 = heapClassInst.heap32[r1 + numDefine31];
    r2 = (r2 + r4) | 0;
    r2 = (r2 + -1) | 0;
    r4 = 0;
    r2 = r2 < 0 ? r4 : r2;
    heapClassInst.heap32[r1 + numDefine31] = r2;
  }
  r2 = heapClassInst.heap32[r1 + numDefine26];
  r2 = (r2 + 1) | 0;
  r4 = r2 >>> numDefine31;
  r4 = (r2 + r4) | 0;
  r4 = r4 & numDefineNeg2;
  r2 = (r2 - r4) | 0;
  r4 = r2 << numDefine2;
  r4 = (r0 + r4) | 0;
  r4 = r4 >> numDefine2;
  heapClassInst.heap32[r1 + numDefine26] = r2;
  r2 = heapClassInst.heap32[r4 + numDefine21];
  if (!(r2 === 0)) {
    r4 = (r0 + numDefine44) | 0;
    repeat6: while (true) {
      r5 = r2 >> numDefine2;
      r6 = heapClassInst.heap32[r5 + numDefine13];
      r7 = heapClassInst.heap32[r5 + numDefine14];
      if (r6 === 0) {
        r6 = heapClassInst.heap32[r5 + numDefine15];
        r6 = r6 << numDefine2;
        r6 = (r0 + r6) | 0;
        r6 = r6 >> numDefine2;
        heapClassInst.heap32[r6 + numDefine21] = r7;
      } else {
        r6 = r6 >> numDefine2;
        heapClassInst.heap32[r6 + numDefine14] = r7;
      }
      r6 = heapClassInst.heap32[r5 + numDefine14];
      if (!(r6 === 0)) {
        r6 = r6 >> numDefine2;
        r8 = heapClassInst.heap32[r5 + numDefine13];
        heapClassInst.heap32[r6 + numDefine13] = r8;
      }
      heapClassInst.heap32[r5 + numDefine13] = 0;
      r6 = heapClassInst.heap32[r1 + numDefine23];
      heapClassInst.heap32[r5 + numDefine14] = r6;
      r6 = heapClassInst.heap32[r1 + numDefine23];
      if (!(r6 === 0)) {
        r6 = r6 >> numDefine2;
        heapClassInst.heap32[r6 + numDefine13] = r2;
      }
      heapClassInst.heap32[r1 + numDefine23] = r2;
      r6 = heapClassInst.heap32[r5 + numDefine12];
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r6;
      zl10removeleafP6btDbvtP10btDbvtNode(i7);
      r8 = heapClassInst.heap32[r1 + numDefine2];
      if (!(r8 === 0)) {
        r9 = gNumAlignedFree;
        r9 = r9 >> numDefine2;
        r10 = heapClassInst.heap32[r9];
        r10 = (r10 + 1) | 0;
        r8 = r8 >> numDefine2;
        heapClassInst.heap32[r9] = r10;
        r8 = heapClassInst.heap32[r8 + -1];
        heapClassInst.heap32[g0] = r8;
        free(i7);
      }
      heapClassInst.heap32[r1 + numDefine2] = r6;
      r6 = heapClassInst.heap32[r1 + numDefine4];
      r6 = (r6 + -1) | 0;
      heapClassInst.heap32[r1 + numDefine4] = r6;
      r6 = heapClassInst.heap32[r1 + numDefine12];
      f0 = heapClassInst.heapFloat[r5 + numDefine4];
      f1 = heapClassInst.heapFloat[r5 + numDefine5];
      f2 = heapClassInst.heapFloat[r5 + numDefine6];
      f3 = heapClassInst.heapFloat[r5 + numDefine7];
      f4 = heapClassInst.heapFloat[r5 + numDefine8];
      f5 = heapClassInst.heapFloat[r5 + numDefine9];
      f6 = heapClassInst.heapFloat[r5 + numDefine10];
      f7 = heapClassInst.heapFloat[r5 + numDefine11];
      if (r6 === 0) {
        r6 = gNumAlignedAllocs;
        r6 = r6 >> numDefine2;
        r8 = heapClassInst.heap32[r6];
        r8 = (r8 + 1) | 0;
        heapClassInst.heap32[r6] = r8;
        heapClassInst.heap32[g0] = numDefine63;
        mallocNew(i7);
        r6 = commonVariable.rg0;
        if (r6 !== 0) {
          r8 = 0;
          r9 = (r6 + numDefine4) | 0;
          r8 = (r8 - r9) | 0;
          r8 = r8 & numDefine15;
          r8 = (r6 + r8) | 0;
          r9 = (r8 + numDefine4) | 0;
          r8 = r8 >> numDefine2;
          heapClassInst.heap32[r8] = r6;
          r6 = r9;
        }
      } else {
        heapClassInst.heap32[r1 + numDefine12] = 0;
      }
      r8 = r6 >> numDefine2;
      heapClassInst.heap32[r8 + numDefine8] = 0;
      heapClassInst.heap32[r8 + numDefine9] = r2;
      heapClassInst.heap32[r8 + numDefine10] = 0;
      heapClassInst.heapFloat[r8] = f0;
      heapClassInst.heapFloat[r8 + 1] = f1;
      heapClassInst.heapFloat[r8 + numDefine2] = f2;
      heapClassInst.heapFloat[r8 + numDefine3] = f3;
      heapClassInst.heapFloat[r8 + numDefine4] = f4;
      heapClassInst.heapFloat[r8 + numDefine5] = f5;
      heapClassInst.heapFloat[r8 + numDefine6] = f6;
      heapClassInst.heapFloat[r8 + numDefine7] = f7;
      r2 = heapClassInst.heap32[r1 + numDefine11];
      heapClassInst.heap32[g0] = r4;
      heapClassInst.heap32[g0 + 1] = r2;
      heapClassInst.heap32[g0 + numDefine2] = r6;
      zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
      r2 = heapClassInst.heap32[r1 + numDefine14];
      r2 = (r2 + 1) | 0;
      heapClassInst.heap32[r1 + numDefine14] = r2;
      heapClassInst.heap32[r5 + numDefine12] = r6;
      heapClassInst.heap32[r5 + numDefine15] = numDefine2;
      r2 = r7;
      if (!(r7 !== 0)) {
        break repeat6;
      }
    }
    r2 = heapClassInst.heap32[r1 + numDefine14];
    r4 = 1;
    heapClassInst.heap32[r1 + numDefine31] = r2;
    heapClassInst.heap8[r0 + numDefine154] = r4;
  }
  r2 = ztv18btDbvtTreeCollider;
  r4 = sp + numDefineNeg32;
  r2 = (r2 + numDefine8) | 0;
  r5 = r4 >> numDefine2;
  heapClassInst.heap32[fp + numDefineNeg8] = r2;
  heapClassInst.heap32[r5 + 1] = r0;
  r5 = heapClassInst.heapU8[r0 + numDefine153];
  if (!(r5 === 0)) {
    r5 = heapClassInst.heap32[r1 + numDefine11];
    r6 = heapClassInst.heap32[r1 + 1];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r6;
    heapClassInst.heap32[g0 + numDefine2] = r5;
    heapClassInst.heap32[g0 + numDefine3] = r4;
    zn6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2RNS8ICollideE(i7);
    r5 = heapClassInst.heapU8[r0 + numDefine153];
    if (!(r5 === 0)) {
      r5 = heapClassInst.heap32[r1 + 1];
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r5;
      heapClassInst.heap32[g0 + numDefine2] = r5;
      heapClassInst.heap32[g0 + numDefine3] = r4;
      zn6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2RNS8ICollideE(i7);
    }
  }
  r3 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[fp + numDefineNeg8] = r2;
  r2 = heapClassInst.heapU8[r0 + numDefine154];
  repeat32: do {
    if (!(r2 === 0)) {
      r2 = heapClassInst.heap32[r1 + numDefine24];
      r4 = r2 >> numDefine2;
      r4 = heapClassInst.heap32[r4];
      r4 = r4 >> numDefine2;
      r4 = heapClassInst.heap32[r4 + numDefine7];
      heapClassInst.heap32[g0] = r2;
      functionTable[r4 >> numDefine2](i7);
      r2 = commonVariable.rg0;
      r4 = r2 >> numDefine2;
      r4 = heapClassInst.heap32[r4 + 1];
      if (!(r4 < 1)) {
        r5 = heapClassInst.heap32[r1 + numDefine29];
        r5 = (r5 * r4) | 0;
        r6 = heapClassInst.heap32[r1 + numDefine30];
        r5 = (r5 / numDefine100) | 0;
        r5 = r6 > r5 ? r6 : r5;
        r5 = r4 < r5 ? r4 : r5;
        if (r5 > 0) {
          r4 = 0;
          repeat37: while (true) {
            r6 = r2 >> numDefine2;
            r7 = heapClassInst.heap32[r1 + numDefine36];
            r7 = (r7 + r4) | 0;
            r8 = heapClassInst.heap32[r6 + 1];
            r7 = r7 % r8 | 0;
            r8 = heapClassInst.heap32[r6 + numDefine3];
            r7 = r7 << numDefine4;
            r7 = (r8 + r7) | 0;
            r7 = r7 >> numDefine2;
            r8 = heapClassInst.heap32[r7 + 1];
            r7 = heapClassInst.heap32[r7];
            r9 = r8 >> numDefine2;
            r10 = r7 >> numDefine2;
            r9 = heapClassInst.heap32[r9 + numDefine12];
            r10 = heapClassInst.heap32[r10 + numDefine12];
            r10 = r10 >> numDefine2;
            r9 = r9 >> numDefine2;
            f0 = heapClassInst.heapFloat[r10];
            f1 = heapClassInst.heapFloat[r9 + numDefine4];
            if (f0 > f1) {
              label = numDefine32;
            } else {
              f0 = heapClassInst.heapFloat[r10 + numDefine4];
              f1 = heapClassInst.heapFloat[r9];
              if (f0 < f1) {
                label = numDefine32;
              } else {
                f0 = heapClassInst.heapFloat[r10 + 1];
                f1 = heapClassInst.heapFloat[r9 + numDefine5];
                if (f0 > f1) {
                  label = numDefine32;
                } else {
                  f0 = heapClassInst.heapFloat[r10 + numDefine5];
                  f1 = heapClassInst.heapFloat[r9 + 1];
                  if (f0 < f1) {
                    label = numDefine32;
                  } else {
                    f0 = heapClassInst.heapFloat[r10 + numDefine2];
                    f1 = heapClassInst.heapFloat[r9 + numDefine6];
                    if (f0 > f1) {
                      label = numDefine32;
                    } else {
                      f0 = heapClassInst.heapFloat[r10 + numDefine6];
                      f1 = heapClassInst.heapFloat[r9 + numDefine2];
                      if (f0 < f1) {
                        label = numDefine32;
                      } else {
                        label = numDefine33;
                      }
                    }
                  }
                }
              }
            }
            if (label === numDefine32) {
              r9 = heapClassInst.heap32[r1 + numDefine24];
              r10 = r9 >> numDefine2;
              r10 = heapClassInst.heap32[r10];
              r10 = r10 >> numDefine2;
              r10 = heapClassInst.heap32[r10 + numDefine3];
              heapClassInst.heap32[g0] = r9;
              heapClassInst.heap32[g0 + 1] = r7;
              heapClassInst.heap32[g0 + numDefine2] = r8;
              heapClassInst.heap32[g0 + numDefine3] = r3;
              r5 = (r5 + -1) | 0;
              r4 = (r4 + -1) | 0;
              functionTable[r10 >> numDefine2](i7);
            }
            r4 = (r4 + 1) | 0;
            if (!(r4 < r5)) {
              break repeat37;
            }
          }
          r4 = heapClassInst.heap32[r6 + 1];
          if (r4 < 1) {
            heapClassInst.heap32[r1 + numDefine36] = 0;
            break repeat32;
          }
        }
        r2 = heapClassInst.heap32[r1 + numDefine36];
        r2 = (r2 + r5) | 0;
        r2 = r2 % r4 | 0;
        heapClassInst.heap32[r1 + numDefine36] = r2;
      }
    }
  } while (false);
  r2 = heapClassInst.heap32[r1 + numDefine35];
  r2 = (r2 + 1) | 0;
  heapClassInst.heap32[r1 + numDefine35] = r2;
  r2 = 0;
  heapClassInst.heap32[r1 + numDefine30] = 1;
  heapClassInst.heap8[r0 + numDefine154] = r2;
  r0 = heapClassInst.heap32[r1 + numDefine32];
  if (r0 === 0) {
    heapClassInst.heap32[r1 + numDefine34] = 0;
    r4 = heapClassInst.heap32[r1 + numDefine33];
  } else {
    r4 = heapClassInst.heap32[r1 + numDefine33];
    f0 = uint(r4);
    f1 = uint(r0);
    f0 = f0 / f1;
    heapClassInst.heapFloat[r1 + numDefine34] = f0;
  }
  r4 = r4 >>> 1;
  r0 = r0 >>> 1;
  heapClassInst.heap32[r1 + numDefine33] = r4;
  heapClassInst.heap32[r1 + numDefine32] = r0;
  r0 = heapClassInst.heap32[r1 + numDefine24];
  r4 = r0 >> numDefine2;
  r4 = heapClassInst.heap32[r4];
  r4 = r4 >> numDefine2;
  r4 = heapClassInst.heap32[r4 + numDefine14];
  heapClassInst.heap32[g0] = r0;
  functionTable[r4 >> numDefine2](i7);
  r0 = commonVariable.rg0;
  if (!(r0 === 0)) {
    r0 = heapClassInst.heap32[r1 + numDefine24];
    r4 = r0 >> numDefine2;
    r4 = heapClassInst.heap32[r4];
    r4 = r4 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + numDefine7];
    heapClassInst.heap32[g0] = r0;
    functionTable[r4 >> numDefine2](i7);
    r0 = commonVariable.rg0;
    r4 = r0 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + 1];
    if (!(r4 < numDefine2)) {
      r4 = (r4 + -1) | 0;
      heapClassInst.heap32[g0] = r0;
      heapClassInst.heap32[g0 + 1] = 0;
      heapClassInst.heap32[g0 + numDefine2] = r4;
      zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi(i7);
    }
    r4 = r2;
    r5 = r2;
    r6 = r2;
    r7 = r2;
    repeat61: while (true) {
      r8 = r0 >> numDefine2;
      r9 = heapClassInst.heap32[r8 + 1];
      if (r9 > r7) {
        r8 = heapClassInst.heap32[r8 + numDefine3];
        r9 = r7 << numDefine4;
        r9 = (r8 + r9) | 0;
        r9 = r9 >> numDefine2;
        r10 = heapClassInst.heap32[r9];
        r11 = r7 << numDefine2;
        r12 = heapClassInst.heap32[r9 + 1];
        if (r10 !== r4) {
          label = numDefine46;
        } else {
          if (r12 === r5) {
            r4 = heapClassInst.heap32[r9 + numDefine2];
            if (r4 === 0) {
              label = numDefine54;
            } else {
              label = numDefine53;
              break repeat61;
            }
          } else {
            label = numDefine46;
          }
        }
        if (label === numDefine46) {
          r4 = r12 >> numDefine2;
          r5 = r10 >> numDefine2;
          r4 = heapClassInst.heap32[r4 + numDefine12];
          r5 = heapClassInst.heap32[r5 + numDefine12];
          r5 = r5 >> numDefine2;
          r4 = r4 >> numDefine2;
          f0 = heapClassInst.heapFloat[r5];
          f1 = heapClassInst.heapFloat[r4 + numDefine4];
          if (f0 > f1) {
            label = numDefine54;
          } else {
            f0 = heapClassInst.heapFloat[r5 + numDefine4];
            f1 = heapClassInst.heapFloat[r4];
            if (f0 < f1) {
              label = numDefine54;
            } else {
              f0 = heapClassInst.heapFloat[r5 + 1];
              f1 = heapClassInst.heapFloat[r4 + numDefine5];
              if (f0 > f1) {
                label = numDefine54;
              } else {
                f0 = heapClassInst.heapFloat[r5 + numDefine5];
                f1 = heapClassInst.heapFloat[r4 + 1];
                if (f0 < f1) {
                  label = numDefine54;
                } else {
                  f0 = heapClassInst.heapFloat[r5 + numDefine2];
                  f1 = heapClassInst.heapFloat[r4 + numDefine6];
                  if (f0 > f1) {
                    label = numDefine54;
                  } else {
                    f0 = heapClassInst.heapFloat[r5 + numDefine6];
                    f1 = heapClassInst.heapFloat[r4 + numDefine2];
                    if (f0 < f1) {
                      label = numDefine54;
                    } else {
                      label = numDefine55;
                    }
                  }
                }
              }
            }
          }
        }
        if (label === numDefine54) {
          r4 = heapClassInst.heap32[r1 + numDefine24];
          r5 = r4 >> numDefine2;
          r5 = heapClassInst.heap32[r5];
          r5 = r5 >> numDefine2;
          r5 = heapClassInst.heap32[r5 + numDefine8];
          r9 = (r8 + r2) | 0;
          r11 = r11 << numDefine2;
          heapClassInst.heap32[g0] = r4;
          heapClassInst.heap32[g0 + 1] = r9;
          heapClassInst.heap32[g0 + numDefine2] = r3;
          r4 = (r8 + r11) | 0;
          r4 = r4 >> numDefine2;
          functionTable[r5 >> numDefine2](i7);
          r6 = (r6 + 1) | 0;
          heapClassInst.heap32[r4] = 0;
          heapClassInst.heap32[r4 + 1] = 0;
        }
        r7 = (r7 + 1) | 0;
        r2 = (r2 + numDefine16) | 0;
        r4 = r10;
        r5 = r12;
      } else {
        label = numDefine57;
        break repeat61;
      }
    }
    switch (label) {
      case numDefine57:
        if (r9 > 1) {
          r9 = (r9 + -1) | 0;
          heapClassInst.heap32[g0] = r0;
          heapClassInst.heap32[g0 + 1] = 0;
          heapClassInst.heap32[g0 + numDefine2] = r9;
          zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi(i7);
          r9 = heapClassInst.heap32[r8 + 1];
        }
        r1 = sp + numDefineNeg16;
        r2 = r1 >> numDefine2;
        heapClassInst.heap32[fp + numDefineNeg4] = 0;
        heapClassInst.heap32[r2 + 1] = 0;
        heapClassInst.heap32[r2 + numDefine2] = 0;
        heapClassInst.heap32[r2 + numDefine3] = 0;
        r2 = (r9 - r6) | 0;
        heapClassInst.heap32[g0] = r0;
        heapClassInst.heap32[g0 + 1] = r2;
        heapClassInst.heap32[g0 + numDefine2] = r1;
        zn20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0(i7);
        break;
      case numDefine53:
        r8 = twoEStr314;
        r0 = twoEStr18;
        heapClassInst.heap32[g0] = r8;
        heapClassInst.heap32[g0 + 1] = r0;
        heapClassInst.heap32[g0 + numDefine2] = numDefine469;
        assertNew(i7);
        break;
      default:
        break;
    }
  }
  return;
}

function zn16btDbvtBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4P12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let f0: number = 0.0;
  let f1: number = 0.0;
  let f2: number = 0.0;
  let f3: number = 0.0;
  let f4: number = 0.0;
  let f5: number = 0.0;
  let f6: number = 0.0;
  let f7: number = 0.0;
  let f8: number = 0.0;
  let f9: number = 0.0;
  let f10: number = 0.0;
  let label = 0;
  i7 = sp + numDefineNeg88;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + numDefine2];
  r0 = r0 >> numDefine2;
  f0 = heapClassInst.heapFloat[r0];
  r1 = sp + numDefineNeg32;
  heapClassInst.heapFloat[fp + numDefineNeg8] = f0;
  f1 = heapClassInst.heapFloat[r0 + 1];
  r2 = r1 >> numDefine2;
  heapClassInst.heapFloat[r2 + 1] = f1;
  f2 = heapClassInst.heapFloat[r0 + numDefine2];
  heapClassInst.heapFloat[r2 + numDefine2] = f2;
  f3 = heapClassInst.heapFloat[r0 + numDefine3];
  r3 = heapClassInst.heap32[fp + numDefine3];
  r3 = r3 >> numDefine2;
  heapClassInst.heapFloat[r2 + numDefine3] = f3;
  f4 = heapClassInst.heapFloat[r3];
  heapClassInst.heapFloat[r2 + numDefine4] = f4;
  f5 = heapClassInst.heapFloat[r3 + 1];
  heapClassInst.heapFloat[r2 + numDefine5] = f5;
  f6 = heapClassInst.heapFloat[r3 + numDefine2];
  heapClassInst.heapFloat[r2 + numDefine6] = f6;
  f7 = heapClassInst.heapFloat[r3 + numDefine3];
  r4 = heapClassInst.heap32[fp + 1];
  r5 = heapClassInst.heap32[fp];
  r6 = r4 >> numDefine2;
  heapClassInst.heapFloat[r2 + numDefine7] = f7;
  r7 = heapClassInst.heap32[r6 + numDefine15];
  repeat1: do {
    if (r7 !== numDefine2) {
      r2 = r5 >> numDefine2;
      r8 = heapClassInst.heap32[r2 + numDefine32];
      r8 = (r8 + 1) | 0;
      heapClassInst.heap32[r2 + numDefine32] = r8;
      r8 = heapClassInst.heap32[r6 + numDefine12];
      r7 = r8 >> numDefine2;
      f8 = heapClassInst.heapFloat[r7];
      if (!(f8 > f4)) {
        f8 = heapClassInst.heapFloat[r7 + numDefine4];
        if (!(f8 < f0)) {
          f8 = heapClassInst.heapFloat[r7 + 1];
          if (!(f8 > f5)) {
            f8 = heapClassInst.heapFloat[r7 + numDefine5];
            if (!(f8 < f1)) {
              f8 = heapClassInst.heapFloat[r7 + numDefine2];
              if (!(f8 > f6)) {
                f8 = heapClassInst.heapFloat[r7 + numDefine6];
                if (!(f8 < f2)) {
                  f0 = heapClassInst.heapFloat[r6 + numDefine4];
                  f1 = heapClassInst.heapFloat[r6 + numDefine8];
                  f1 = f1 - f0;
                  f2 = numDefineFloat05;
                  f3 = heapClassInst.heapFloat[r6 + numDefine5];
                  f4 = heapClassInst.heapFloat[r6 + numDefine9];
                  f4 = f4 - f3;
                  f5 = heapClassInst.heapFloat[r0 + 1];
                  f6 = heapClassInst.heapFloat[r0];
                  f1 = f1 * f2;
                  f7 = heapClassInst.heapFloat[r2 + numDefine25];
                  f8 = heapClassInst.heapFloat[r0 + numDefine2];
                  f9 = heapClassInst.heapFloat[r6 + numDefine6];
                  f10 = heapClassInst.heapFloat[r6 + numDefine10];
                  r7 = sp + numDefineNeg48;
                  f10 = f10 - f9;
                  f4 = f4 * f2;
                  f1 = f1 * f7;
                  f2 = f10 * f2;
                  f4 = f4 * f7;
                  r9 = r7 >> numDefine2;
                  heapClassInst.heapFloat[fp + numDefineNeg12] = f1;
                  f2 = f2 * f7;
                  heapClassInst.heapFloat[r9 + 1] = f4;
                  heapClassInst.heapFloat[r9 + numDefine2] = f2;
                  heapClassInst.heap32[r9 + numDefine3] = 0;
                  f0 = f6 - f0;
                  f6 = 0;
                  if (!(f0 >= f6)) {
                    f0 = -f1;
                    heapClassInst.heapFloat[fp + numDefineNeg12] = f0;
                  }
                  f0 = f5 - f3;
                  if (!(f0 >= f6)) {
                    f0 = -f4;
                    heapClassInst.heapFloat[r9 + 1] = f0;
                  }
                  f0 = f8 - f9;
                  if (!(f0 >= f6)) {
                    f0 = -f2;
                    heapClassInst.heapFloat[r9 + numDefine2] = f0;
                  }
                  r9 = (r5 + numDefine4) | 0;
                  heapClassInst.heap32[g0] = r9;
                  heapClassInst.heap32[g0 + 1] = r8;
                  heapClassInst.heap32[g0 + numDefine2] = r1;
                  heapClassInst.heap32[g0 + numDefine3] = r7;
                  heapClassInst.heap32[g0 + numDefine4] = numDefine43341;
                  zn6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmRK9btVector3f(i7);
                  r8 = commonVariable.rg0;
                  if (r8 !== 0) {
                    r7 = heapClassInst.heap32[r2 + numDefine33];
                    r8 = 1;
                    r7 = (r7 + 1) | 0;
                    heapClassInst.heap32[r2 + numDefine33] = r7;
                    break repeat1;
                  } else {
                    r8 = 0;
                    break repeat1;
                  }
                }
              }
            }
          }
        }
      }
      r1 = (r5 + numDefine4) | 0;
      heapClassInst.heap32[g0] = r1;
      heapClassInst.heap32[g0 + 1] = r8;
      zl10removeleafP6btDbvtP10btDbvtNode(i7);
      r9 = commonVariable.rg0;
      repeat23: do {
        if (r9 !== 0) {
          r11 = heapClassInst.heap32[r2 + numDefine3];
          if (r11 < 0) {
            r10 = heapClassInst.heap32[r2 + 1];
          } else {
            r12 = -1;
            while (true) {
              r10 = r9;
              r12 = (r12 + 1) | 0;
              if (r11 > r12) {
                r9 = r10 >> numDefine2;
                r9 = heapClassInst.heap32[r9 + numDefine8];
                if (r9 === 0) {
                  break repeat23;
                }
              } else {
                break repeat23;
              }
            }
          }
        } else {
          r10 = 0;
        }
      } while (false);
      heapClassInst.heapFloat[r7] = f0;
      heapClassInst.heapFloat[r7 + 1] = f1;
      heapClassInst.heapFloat[r7 + numDefine2] = f2;
      heapClassInst.heapFloat[r7 + numDefine3] = f3;
      heapClassInst.heapFloat[r7 + numDefine4] = f4;
      heapClassInst.heapFloat[r7 + numDefine5] = f5;
      heapClassInst.heapFloat[r7 + numDefine6] = f6;
      heapClassInst.heapFloat[r7 + numDefine7] = f7;
      heapClassInst.heap32[g0] = r1;
      heapClassInst.heap32[g0 + 1] = r10;
      heapClassInst.heap32[g0 + numDefine2] = r8;
      zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
      r1 = heapClassInst.heap32[r2 + numDefine33];
      r8 = 1;
      r1 = (r1 + 1) | 0;
      heapClassInst.heap32[r2 + numDefine33] = r1;
    } else {
      r1 = heapClassInst.heap32[r6 + numDefine12];
      r7 = (r5 + numDefine44) | 0;
      heapClassInst.heap32[g0] = r7;
      heapClassInst.heap32[g0 + 1] = r1;
      r7 = r5 >> numDefine2;
      zl10removeleafP6btDbvtP10btDbvtNode(i7);
      r8 = heapClassInst.heap32[r7 + numDefine12];
      if (!(r8 === 0)) {
        r9 = gNumAlignedFree;
        r9 = r9 >> numDefine2;
        r10 = heapClassInst.heap32[r9];
        r10 = (r10 + 1) | 0;
        r8 = r8 >> numDefine2;
        heapClassInst.heap32[r9] = r10;
        r8 = heapClassInst.heap32[r8 + -1];
        heapClassInst.heap32[g0] = r8;
        free(i7);
      }
      heapClassInst.heap32[r7 + numDefine12] = r1;
      r1 = heapClassInst.heap32[r7 + numDefine14];
      r1 = (r1 + -1) | 0;
      heapClassInst.heap32[r7 + numDefine14] = r1;
      r1 = heapClassInst.heap32[r7 + numDefine2];
      r8 = (r5 + numDefine4) | 0;
      if (r1 === 0) {
        r1 = gNumAlignedAllocs;
        r1 = r1 >> numDefine2;
        r9 = heapClassInst.heap32[r1];
        r9 = (r9 + 1) | 0;
        heapClassInst.heap32[r1] = r9;
        heapClassInst.heap32[g0] = numDefine63;
        mallocNew(i7);
        r1 = commonVariable.rg0;
        if (r1 !== 0) {
          r9 = 0;
          r10 = (r1 + numDefine4) | 0;
          r9 = (r9 - r10) | 0;
          r9 = r9 & numDefine15;
          r9 = (r1 + r9) | 0;
          r10 = (r9 + numDefine4) | 0;
          r9 = r9 >> numDefine2;
          heapClassInst.heap32[r9] = r1;
          r1 = r10;
        }
      } else {
        heapClassInst.heap32[r7 + numDefine2] = 0;
      }
      r9 = r1 >> numDefine2;
      heapClassInst.heap32[r9 + numDefine8] = 0;
      heapClassInst.heap32[r9 + numDefine9] = r4;
      heapClassInst.heap32[r9 + numDefine10] = 0;
      heapClassInst.heap32[r9] = heapClassInst.heap32[fp + numDefineNeg8];
      heapClassInst.heap32[r9 + 1] = heapClassInst.heap32[r2 + 1];
      heapClassInst.heap32[r9 + numDefine2] = heapClassInst.heap32[r2 + numDefine2];
      heapClassInst.heap32[r9 + numDefine3] = heapClassInst.heap32[r2 + numDefine3];
      heapClassInst.heapFloat[r9 + numDefine4] = f4;
      heapClassInst.heapFloat[r9 + numDefine5] = f5;
      heapClassInst.heapFloat[r9 + numDefine6] = f6;
      heapClassInst.heapFloat[r9 + numDefine7] = f7;
      r2 = heapClassInst.heap32[r7 + 1];
      heapClassInst.heap32[g0] = r8;
      heapClassInst.heap32[g0 + 1] = r2;
      heapClassInst.heap32[g0 + numDefine2] = r1;
      zl10insertleafP6btDbvtP10btDbvtNodeS2(i7);
      r2 = heapClassInst.heap32[r7 + numDefine4];
      r2 = (r2 + 1) | 0;
      r8 = 1;
      heapClassInst.heap32[r7 + numDefine4] = r2;
      heapClassInst.heap32[r6 + numDefine12] = r1;
    }
  } while (false);
  r1 = heapClassInst.heap32[r6 + numDefine13];
  r2 = heapClassInst.heap32[r6 + numDefine14];
  if (r1 === 0) {
    r1 = heapClassInst.heap32[r6 + numDefine15];
    r1 = r1 << numDefine2;
    r1 = (r5 + r1) | 0;
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r1 + numDefine21] = r2;
  } else {
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r1 + numDefine14] = r2;
  }
  r1 = heapClassInst.heap32[r6 + numDefine14];
  if (!(r1 === 0)) {
    r1 = r1 >> numDefine2;
    r2 = heapClassInst.heap32[r6 + numDefine13];
    heapClassInst.heap32[r1 + numDefine13] = r2;
  }
  heapClassInst.heap32[r6 + numDefine4] = heapClassInst.heap32[r0];
  heapClassInst.heap32[r6 + numDefine5] = heapClassInst.heap32[r0 + 1];
  heapClassInst.heap32[r6 + numDefine6] = heapClassInst.heap32[r0 + numDefine2];
  heapClassInst.heap32[r6 + numDefine7] = heapClassInst.heap32[r0 + numDefine3];
  heapClassInst.heap32[r6 + numDefine8] = heapClassInst.heap32[r3];
  heapClassInst.heap32[r6 + numDefine9] = heapClassInst.heap32[r3 + 1];
  heapClassInst.heap32[r6 + numDefine10] = heapClassInst.heap32[r3 + numDefine2];
  r0 = r5 >> numDefine2;
  heapClassInst.heap32[r6 + numDefine11] = heapClassInst.heap32[r3 + numDefine3];
  r1 = heapClassInst.heap32[r0 + numDefine26];
  heapClassInst.heap32[r6 + numDefine15] = r1;
  r1 = heapClassInst.heap32[r0 + numDefine26];
  r1 = r1 << numDefine2;
  r1 = (r5 + r1) | 0;
  r1 = r1 >> numDefine2;
  heapClassInst.heap32[r6 + numDefine13] = 0;
  r2 = heapClassInst.heap32[r1 + numDefine21];
  heapClassInst.heap32[r6 + numDefine14] = r2;
  r2 = heapClassInst.heap32[r1 + numDefine21];
  if (!(r2 === 0)) {
    r2 = r2 >> numDefine2;
    heapClassInst.heap32[r2 + numDefine13] = r4;
  }
  r2 = r8 & 1;
  heapClassInst.heap32[r1 + numDefine21] = r4;
  if (!(r2 === 0)) {
    r1 = 1;
    heapClassInst.heap8[r5 + numDefine154] = r1;
    r1 = heapClassInst.heapU8[r5 + numDefine153];
    if (!(r1 !== 0)) {
      r1 = ztv18btDbvtTreeCollider;
      r2 = sp + numDefineNeg64;
      r1 = (r1 + numDefine8) | 0;
      r3 = r2 >> numDefine2;
      heapClassInst.heap32[fp + numDefineNeg16] = r1;
      heapClassInst.heap32[r3 + 1] = r5;
      r1 = heapClassInst.heap32[r6 + numDefine12];
      r3 = heapClassInst.heap32[r0 + numDefine11];
      r4 = (r5 + numDefine44) | 0;
      heapClassInst.heap32[g0] = r4;
      heapClassInst.heap32[g0 + 1] = r3;
      heapClassInst.heap32[g0 + numDefine2] = r1;
      heapClassInst.heap32[g0 + numDefine3] = r2;
      zn6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2RNS8ICollideE(i7);
      r1 = heapClassInst.heap32[r6 + numDefine12];
      r0 = heapClassInst.heap32[r0 + 1];
      r3 = (r5 + numDefine4) | 0;
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r0;
      heapClassInst.heap32[g0 + numDefine2] = r1;
      heapClassInst.heap32[g0 + numDefine3] = r2;
      zn6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2RNS8ICollideE(i7);
    }
  }
  return;
}

function zn16btDbvtBroadphaseD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv16btDbvtBroadphase;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heapU8[r0 + numDefine152];
  if (!(r1 === 0)) {
    r1 = heapClassInst.heap32[r2 + numDefine24];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine24];
    if (!(r1 === 0)) {
      r2 = gNumAlignedFree;
      r2 = r2 >> numDefine2;
      r3 = heapClassInst.heap32[r2];
      r3 = (r3 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r2] = r3;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
  }
  r1 = (r0 + numDefine4) | 0;
  if (!(r1 === 0)) {
    r2 = (r1 + numDefine80) | 0;
    if (!(r2 === r1)) {
      r1 = (r0 + numDefine44) | 0;
      r2 = 0;
      repeat8: while (true) {
        r3 = (r0 + r2) | 0;
        r4 = r3 >> numDefine2;
        r5 = heapClassInst.heap32[r4 + numDefine11];
        if (!(r5 === 0)) {
          r6 = (r1 + r2) | 0;
          heapClassInst.heap32[g0] = r6;
          heapClassInst.heap32[g0 + 1] = r5;
          zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
        }
        r5 = heapClassInst.heap32[r4 + numDefine12];
        if (!(r5 === 0)) {
          r6 = gNumAlignedFree;
          r6 = r6 >> numDefine2;
          r7 = heapClassInst.heap32[r6];
          r7 = (r7 + 1) | 0;
          r5 = r5 >> numDefine2;
          heapClassInst.heap32[r6] = r7;
          r5 = heapClassInst.heap32[r5 + -1];
          heapClassInst.heap32[g0] = r5;
          free(i7);
        }
        heapClassInst.heap32[r4 + numDefine12] = 0;
        heapClassInst.heap32[r4 + numDefine13] = -1;
        r5 = heapClassInst.heap32[r4 + numDefine19];
        if (!(r5 === 0)) {
          r6 = heapClassInst.heapU8[r3 + numDefine80];
          if (!(r6 === 0)) {
            r6 = gNumAlignedFree;
            r6 = r6 >> numDefine2;
            r7 = heapClassInst.heap32[r6];
            r7 = (r7 + 1) | 0;
            r5 = r5 >> numDefine2;
            heapClassInst.heap32[r6] = r7;
            r5 = heapClassInst.heap32[r5 + -1];
            heapClassInst.heap32[g0] = r5;
            free(i7);
          }
          heapClassInst.heap32[r4 + numDefine19] = 0;
        }
        r5 = 1;
        heapClassInst.heap32[r4 + numDefine15] = 0;
        heapClassInst.heap8[r3 + numDefine80] = r5;
        heapClassInst.heap32[r4 + numDefine19] = 0;
        r2 = (r2 + numDefineNeg40) | 0;
        heapClassInst.heap32[r4 + numDefine17] = 0;
        heapClassInst.heap32[r4 + numDefine18] = 0;
        if (r2 !== numDefineNeg80) {
          continue repeat8;
        } else {
          break repeat8;
        }
      }
    }
  }
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn16btDbvtBroadphaseD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv16btDbvtBroadphase;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heapU8[r0 + numDefine152];
  if (!(r1 === 0)) {
    r1 = heapClassInst.heap32[r2 + numDefine24];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = heapClassInst.heap32[r2 + numDefine24];
    if (!(r1 === 0)) {
      r2 = gNumAlignedFree;
      r2 = r2 >> numDefine2;
      r3 = heapClassInst.heap32[r2];
      r3 = (r3 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r2] = r3;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
  }
  r1 = (r0 + numDefine4) | 0;
  if (!(r1 === 0)) {
    r2 = (r1 + numDefine80) | 0;
    if (!(r2 === r1)) {
      r1 = (r0 + numDefine44) | 0;
      r2 = 0;
      repeat8: while (true) {
        r3 = (r0 + r2) | 0;
        r4 = r3 >> numDefine2;
        r5 = heapClassInst.heap32[r4 + numDefine11];
        if (!(r5 === 0)) {
          r6 = (r1 + r2) | 0;
          heapClassInst.heap32[g0] = r6;
          heapClassInst.heap32[g0 + 1] = r5;
          zl17recursedeletenodeP6btDbvtP10btDbvtNode(i7);
        }
        r5 = heapClassInst.heap32[r4 + numDefine12];
        if (!(r5 === 0)) {
          r6 = gNumAlignedFree;
          r6 = r6 >> numDefine2;
          r7 = heapClassInst.heap32[r6];
          r7 = (r7 + 1) | 0;
          r5 = r5 >> numDefine2;
          heapClassInst.heap32[r6] = r7;
          r5 = heapClassInst.heap32[r5 + -1];
          heapClassInst.heap32[g0] = r5;
          free(i7);
        }
        heapClassInst.heap32[r4 + numDefine12] = 0;
        heapClassInst.heap32[r4 + numDefine13] = -1;
        r5 = heapClassInst.heap32[r4 + numDefine19];
        if (!(r5 === 0)) {
          r6 = heapClassInst.heapU8[r3 + numDefine80];
          if (!(r6 === 0)) {
            r6 = gNumAlignedFree;
            r6 = r6 >> numDefine2;
            r7 = heapClassInst.heap32[r6];
            r7 = (r7 + 1) | 0;
            r5 = r5 >> numDefine2;
            heapClassInst.heap32[r6] = r7;
            r5 = heapClassInst.heap32[r5 + -1];
            heapClassInst.heap32[g0] = r5;
            free(i7);
          }
          heapClassInst.heap32[r4 + numDefine19] = 0;
        }
        r5 = 1;
        heapClassInst.heap32[r4 + numDefine15] = 0;
        heapClassInst.heap8[r3 + numDefine80] = r5;
        heapClassInst.heap32[r4 + numDefine19] = 0;
        r2 = (r2 + numDefineNeg40) | 0;
        heapClassInst.heap32[r4 + numDefine17] = 0;
        heapClassInst.heap32[r4 + numDefine18] = 0;
        if (r2 !== numDefineNeg80) {
          continue repeat8;
        } else {
          break repeat8;
        }
      }
    }
  }
  return;
}

function zn12btDispatcherD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv12btDispatcher;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn12btDispatcherD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv12btDispatcher;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zn28btHashedOverlappingPairCache23getOverlappingPairArrayEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = (r0 + numDefine4) | 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[r0 + numDefine6] = r1;
  return;
}

function zn28btHashedOverlappingPairCache18hasDeferredRemovalEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[r0 + numDefine18] = r1;
  return;
}

function zn28btHashedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0 + numDefine2];
  if (!(r1 === 0)) {
    r2 = heapClassInst.heap32[fp + numDefine2];
    r3 = r1 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    heapClassInst.heap32[g0] = r1;
    functionTable[r3 >> numDefine2](i7);
    r1 = r2 >> numDefine2;
    r1 = heapClassInst.heap32[r1];
    r1 = r1 >> numDefine2;
    r1 = heapClassInst.heap32[r1 + numDefine13];
    r3 = heapClassInst.heap32[r0 + numDefine2];
    heapClassInst.heap32[g0] = r2;
    heapClassInst.heap32[g0 + 1] = r3;
    functionTable[r1 >> numDefine2](i7);
    heapClassInst.heap32[r0 + numDefine2] = 0;
  }
  return;
}

function zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztvzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztvzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair(
  sp: number
): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[fp + 1];
  r2 = heapClassInst.heap32[r0 + 1];
  r3 = r1 >> numDefine2;
  r4 = heapClassInst.heap32[r3];
  if (r4 === r2) {
    label = numDefine2;
  } else {
    r3 = heapClassInst.heap32[r3 + 1];
    if (r3 !== r2) {
      label = numDefine3;
    } else {
      label = numDefine2;
    }
  }
  if (label === numDefine2) {
    r2 = heapClassInst.heap32[r0 + numDefine2];
    r3 = r2 >> numDefine2;
    r3 = heapClassInst.heap32[r3];
    r3 = r3 >> numDefine2;
    r3 = heapClassInst.heap32[r3 + numDefine8];
    r0 = heapClassInst.heap32[r0 + numDefine3];
    heapClassInst.heap32[g0] = r2;
    heapClassInst.heap32[g0 + 1] = r1;
    heapClassInst.heap32[g0 + numDefine2] = r0;
    functionTable[r3 >> numDefine2](i7);
  }
  r0 = 0;
  commonVariable.rg0 = r0;
  return;
}

function zzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev(
  sp: number
): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztvzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback;
  r0 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r0] = r1;
  return;
}

function zzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev(
  sp: number
): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztvzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zzn28btHashedOver(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[fp + 1];
  r0 = heapClassInst.heap32[r0 + 1];
  r1 = r1 >> numDefine2;
  r2 = heapClassInst.heap32[r1];
  if (r2 === r0) {
    r0 = 1;
    commonVariable.rg0 = r0;
    return;
  } else {
    r1 = heapClassInst.heap32[r1 + 1];
    r0 = r1 === r0 ? 1 : 0;
    r0 = r0 & 1;
    commonVariable.rg0 = r0;
    return;
  }
}

function zn28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine4];
  commonVariable.rg0 = r0;
  return;
}

function znk28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine4];
  commonVariable.rg0 = r0;
  return;
}

function znk28btHashedOverlappingPairCache22getNumOverlappingPairsEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine2];
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = heapClassInst.heap32[fp + 1];
  r2 = heapClassInst.heap32[fp + numDefine2];
  r3 = 0;
  r4 = r3;
  repeat1: while (true) {
    r5 = r4 << numDefine2;
    repeat3: while (true) {
      r6 = r0 >> numDefine2;
      r7 = heapClassInst.heap32[r6 + numDefine2];
      if (r7 > r4) {
        r7 = r1 >> numDefine2;
        r7 = heapClassInst.heap32[r7];
        r7 = r7 >> numDefine2;
        r8 = heapClassInst.heap32[r6 + numDefine4];
        r7 = heapClassInst.heap32[r7 + numDefine2];
        r9 = (r8 + r3) | 0;
        heapClassInst.heap32[g0] = r1;
        heapClassInst.heap32[g0 + 1] = r9;
        functionTable[r7 >> numDefine2](i7);
        r7 = commonVariable.rg0;
        if (r7 === 0) {
          break repeat3;
        } else {
          r7 = r5 << numDefine2;
          r6 = heapClassInst.heap32[r6];
          r7 = (r8 + r7) | 0;
          r7 = r7 >> numDefine2;
          r6 = r6 >> numDefine2;
          r6 = heapClassInst.heap32[r6 + numDefine3];
          r8 = heapClassInst.heap32[r7 + 1];
          r7 = heapClassInst.heap32[r7];
          heapClassInst.heap32[g0] = r0;
          heapClassInst.heap32[g0 + 1] = r7;
          heapClassInst.heap32[g0 + numDefine2] = r8;
          heapClassInst.heap32[g0 + numDefine3] = r2;
          r7 = gOverlappingPairs;
          r7 = r7 >> numDefine2;
          functionTable[r6 >> numDefine2](i7);
          r6 = heapClassInst.heap32[r7];
          r6 = (r6 + -1) | 0;
          heapClassInst.heap32[r7] = r6;
          continue repeat3;
        }
      } else {
        break repeat1;
      }
    }
    r4 = (r4 + 1) | 0;
    r3 = (r3 + numDefine16) | 0;
    continue repeat1;
  }
  return;
}

function zn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg24;
  let g0 = i7 >> numDefine2;
  r0 = ztvzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback;
  r1 = sp + numDefineNeg8;
  r0 = (r0 + numDefine8) | 0;
  r2 = heapClassInst.heap32[fp];
  r3 = r1 >> numDefine2;
  r4 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[fp + numDefineNeg2] = r0;
  r0 = r2 >> numDefine2;
  heapClassInst.heap32[r3 + 1] = r4;
  r0 = heapClassInst.heap32[r0];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine12];
  r3 = heapClassInst.heap32[fp + numDefine2];
  heapClassInst.heap32[g0] = r2;
  heapClassInst.heap32[g0 + 1] = r1;
  heapClassInst.heap32[g0 + numDefine2] = r3;
  functionTable[r0 >> numDefine2](i7);
  return;
}

function zn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg32;
  let g0 = i7 >> numDefine2;
  r0 = ztvzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback;
  r1 = sp + numDefineNeg16;
  r0 = (r0 + numDefine8) | 0;
  r2 = r1 >> numDefine2;
  r3 = heapClassInst.heap32[fp + 1];
  heapClassInst.heap32[fp + numDefineNeg4] = r0;
  r0 = heapClassInst.heap32[fp];
  heapClassInst.heap32[r2 + 1] = r3;
  r3 = heapClassInst.heap32[fp + numDefine2];
  heapClassInst.heap32[r2 + numDefine2] = r0;
  r4 = r0 >> numDefine2;
  heapClassInst.heap32[r2 + numDefine3] = r3;
  r2 = heapClassInst.heap32[r4];
  r2 = r2 >> numDefine2;
  r2 = heapClassInst.heap32[r2 + numDefine12];
  heapClassInst.heap32[g0] = r0;
  heapClassInst.heap32[g0 + 1] = r1;
  heapClassInst.heap32[g0 + numDefine2] = r3;
  functionTable[r2 >> numDefine2](i7);
  return;
}

function zn28btHashedOverlappingPairCacheD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv28btHashedOverlappingPairCache;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine16];
  if (!(r1 === 0)) {
    r3 = heapClassInst.heapU8[r0 + numDefine68];
    if (!(r3 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine16] = 0;
  }
  r1 = 1;
  heapClassInst.heap8[r0 + numDefine68] = r1;
  heapClassInst.heap32[r2 + numDefine16] = 0;
  heapClassInst.heap32[r2 + numDefine14] = 0;
  heapClassInst.heap32[r2 + numDefine15] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine11];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine48];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine11] = 0;
  }
  heapClassInst.heap8[r0 + numDefine48] = r1;
  heapClassInst.heap32[r2 + numDefine11] = 0;
  heapClassInst.heap32[r2 + numDefine9] = 0;
  heapClassInst.heap32[r2 + numDefine10] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine4];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine20];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine4] = 0;
  }
  heapClassInst.heap8[r0 + numDefine20] = r1;
  heapClassInst.heap32[r2 + numDefine4] = 0;
  heapClassInst.heap32[r2 + numDefine2] = 0;
  heapClassInst.heap32[r2 + numDefine3] = 0;
  heapClassInst.heap32[g0] = r0;
  zdlPv(i7);
  return;
}

function zn28btHashedOverlappingPairCacheD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv28btHashedOverlappingPairCache;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine16];
  if (!(r1 === 0)) {
    r3 = heapClassInst.heapU8[r0 + numDefine68];
    if (!(r3 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine16] = 0;
  }
  r1 = 1;
  heapClassInst.heap8[r0 + numDefine68] = r1;
  heapClassInst.heap32[r2 + numDefine16] = 0;
  heapClassInst.heap32[r2 + numDefine14] = 0;
  heapClassInst.heap32[r2 + numDefine15] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine11];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine48];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine11] = 0;
  }
  heapClassInst.heap8[r0 + numDefine48] = r1;
  heapClassInst.heap32[r2 + numDefine11] = 0;
  heapClassInst.heap32[r2 + numDefine9] = 0;
  heapClassInst.heap32[r2 + numDefine10] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine4];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine20];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine4] = 0;
  }
  heapClassInst.heap8[r0 + numDefine20] = r1;
  heapClassInst.heap32[r2 + numDefine4] = 0;
  heapClassInst.heap32[r2 + numDefine2] = 0;
  heapClassInst.heap32[r2 + numDefine3] = 0;
  return;
}

function zn28btHashedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = gAddedPairs;
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0];
  r2 = heapClassInst.heap32[fp];
  r1 = (r1 + 1) | 0;
  r3 = r2 >> numDefine2;
  heapClassInst.heap32[r0] = r1;
  r0 = heapClassInst.heap32[r3 + numDefine6];
  r1 = heapClassInst.heap32[fp + 1];
  r4 = heapClassInst.heap32[fp + numDefine2];
  if (r0 === 0) {
    r0 = heapClassInst.heapU16[(r4 + numDefine6) >> 1];
    r5 = heapClassInst.heapU16[(r1 + numDefine4) >> 1];
    r0 = r0 & r5;
    r0 = r0 & numDefine65535;
    if (r0 === 0) {
      label = numDefine23;
    } else {
      r0 = heapClassInst.heapU16[(r1 + numDefine6) >> 1];
      r5 = heapClassInst.heapU16[(r4 + numDefine4) >> 1];
      r0 = r0 & r5;
      r0 = r0 & numDefine65535;
      r5 = 0;
      r0 = r0 !== r5 ? 1 : 0;
      r0 = r0 & 1;
      label = numDefine4;
    }
  } else {
    r5 = r0 >> numDefine2;
    r5 = heapClassInst.heap32[r5];
    r5 = r5 >> numDefine2;
    r5 = heapClassInst.heap32[r5 + numDefine2];
    heapClassInst.heap32[g0] = r0;
    heapClassInst.heap32[g0 + 1] = r1;
    heapClassInst.heap32[g0 + numDefine2] = r4;
    functionTable[r5 >> numDefine2](i7);
    r0 = commonVariable.rg0;
    label = numDefine4;
  }
  if (label === numDefine4) {
    r0 = r0 & numDefine255;
    if (!(r0 === 0)) {
      r0 = r1 >> numDefine2;
      r5 = r4 >> numDefine2;
      r0 = heapClassInst.heap32[r0 + numDefine3];
      r5 = heapClassInst.heap32[r5 + numDefine3];
      r6 = r0 > r5 ? r1 : r4;
      r0 = r0 > r5 ? r4 : r1;
      r1 = r6 >> numDefine2;
      r4 = heapClassInst.heap32[r1 + numDefine3];
      r5 = r0 >> numDefine2;
      r7 = heapClassInst.heap32[r5 + numDefine3];
      r8 = r4 << numDefine16;
      r8 = r8 | r7;
      r9 = r8 << numDefine15;
      r9 = r9 ^ -1;
      r8 = (r8 + r9) | 0;
      r9 = r8 >> numDefine10;
      r8 = r9 ^ r8;
      r8 = (r8 * numDefine9) | 0;
      r9 = r8 >> numDefine6;
      r8 = r9 ^ r8;
      r9 = r8 << numDefine11;
      r9 = r9 ^ -1;
      r8 = (r8 + r9) | 0;
      r9 = heapClassInst.heap32[r3 + numDefine3];
      r10 = r8 >> numDefine16;
      r8 = r10 ^ r8;
      r10 = (r9 + -1) | 0;
      r10 = r8 & r10;
      r11 = heapClassInst.heap32[r3 + numDefine11];
      r12 = r10 << numDefine2;
      r11 = (r11 + r12) | 0;
      repeat8: while (true) {
        r11 = r11 >> numDefine2;
        r11 = heapClassInst.heap32[r11];
        if (r11 === -1) {
          label = numDefine13;
          break repeat8;
        } else {
          r12 = heapClassInst.heap32[r3 + numDefine4];
          r13 = r11 << numDefine4;
          r12 = (r12 + r13) | 0;
          r13 = r12 >> numDefine2;
          r14 = heapClassInst.heap32[r13];
          r14 = r14 >> numDefine2;
          r14 = heapClassInst.heap32[r14 + numDefine3];
          if (!(r14 !== r7)) {
            r13 = heapClassInst.heap32[r13 + 1];
            r13 = r13 >> numDefine2;
            r13 = heapClassInst.heap32[r13 + numDefine3];
            if (!(r13 !== r4)) {
              label = numDefine10;
              break repeat8;
            }
          }
          r12 = heapClassInst.heap32[r3 + numDefine16];
          r11 = r11 << numDefine2;
          r11 = (r12 + r11) | 0;
        }
      }
      repeat14: do {
        switch (label) {
          case numDefine13:
            r4 = heapClassInst.heap32[r3 + numDefine2];
            label = numDefine14;
            break repeat14;
          case numDefine10:
            r4 = heapClassInst.heap32[r3 + numDefine2];
            if (r4 > r11) {
              if (r12 !== 0) {
                label = numDefine22;
              } else {
                label = numDefine14;
              }
            } else {
              r0 = twoEStr222;
              r1 = twoEStr323;
              heapClassInst.heap32[g0] = r0;
              heapClassInst.heap32[g0 + 1] = r1;
              heapClassInst.heap32[g0 + numDefine2] = numDefine250;
              assertNew(i7);
            }
            break;
          default:
            break;
        }
      } while (false);
      if (label === numDefine14) {
        r12 = (r2 + numDefine4) | 0;
        heapClassInst.heap32[g0] = r12;
        zn20btAlignedObjectArrayI16btBroadphasePairE21expandNonInitializingEv(i7);
        r12 = commonVariable.rg0;
        r7 = heapClassInst.heap32[r3 + numDefine18];
        if (!(r7 === 0)) {
          r11 = r7 >> numDefine2;
          r11 = heapClassInst.heap32[r11];
          r11 = r11 >> numDefine2;
          r11 = heapClassInst.heap32[r11 + numDefine2];
          heapClassInst.heap32[g0] = r7;
          heapClassInst.heap32[g0 + 1] = r0;
          heapClassInst.heap32[g0 + numDefine2] = r6;
          functionTable[r11 >> numDefine2](i7);
        }
        r7 = heapClassInst.heap32[r3 + numDefine3];
        if (r9 < r7) {
          heapClassInst.heap32[g0] = r2;
          zn28btHashedOverlappingPairCache10growTablesEv(i7);
          r10 = heapClassInst.heap32[r3 + numDefine3];
          r10 = (r10 + -1) | 0;
          r10 = r10 & r8;
        }
        r2 = heapClassInst.heap32[r5 + numDefine3];
        r1 = heapClassInst.heap32[r1 + numDefine3];
        if (r2 >= r1) {
          r1 = r12 >> numDefine2;
          heapClassInst.heap32[r1] = r6;
          heapClassInst.heap32[r1 + 1] = r0;
        } else {
          r1 = r12 >> numDefine2;
          heapClassInst.heap32[r1] = r0;
          heapClassInst.heap32[r1 + 1] = r6;
        }
        r0 = r12 >> numDefine2;
        heapClassInst.heap32[r0 + numDefine2] = 0;
        heapClassInst.heap32[r0 + numDefine3] = 0;
        r0 = r10 << numDefine2;
        r1 = heapClassInst.heap32[r3 + numDefine11];
        r1 = (r1 + r0) | 0;
        r1 = r1 >> numDefine2;
        r2 = r4 << numDefine2;
        r5 = heapClassInst.heap32[r3 + numDefine16];
        r2 = (r5 + r2) | 0;
        r1 = heapClassInst.heap32[r1];
        r2 = r2 >> numDefine2;
        heapClassInst.heap32[r2] = r1;
        r1 = heapClassInst.heap32[r3 + numDefine11];
        r0 = (r1 + r0) | 0;
        r0 = r0 >> numDefine2;
        heapClassInst.heap32[r0] = r4;
      }
      commonVariable.rg0 = r12;
      return;
    }
  }
  r0 = 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1P12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = gRemovePairs;
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0];
  r2 = heapClassInst.heap32[fp + numDefine2];
  r3 = heapClassInst.heap32[fp + 1];
  r1 = (r1 + 1) | 0;
  r4 = r3 >> numDefine2;
  heapClassInst.heap32[r0] = r1;
  r0 = r2 >> numDefine2;
  r1 = heapClassInst.heap32[r4 + numDefine3];
  r0 = heapClassInst.heap32[r0 + numDefine3];
  r4 = r1 > r0 ? r3 : r2;
  r0 = r1 > r0 ? r2 : r3;
  r1 = r4 >> numDefine2;
  r1 = heapClassInst.heap32[r1 + numDefine3];
  r2 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r2 + numDefine3];
  r3 = r1 << numDefine16;
  r3 = r3 | r2;
  r5 = r3 << numDefine15;
  r5 = r5 ^ -1;
  r3 = (r3 + r5) | 0;
  r5 = r3 >> numDefine10;
  r3 = r5 ^ r3;
  r3 = (r3 * numDefine9) | 0;
  r5 = r3 >> numDefine6;
  r3 = r5 ^ r3;
  r5 = r3 << numDefine11;
  r6 = heapClassInst.heap32[fp];
  r5 = r5 ^ -1;
  r7 = r6 >> numDefine2;
  r3 = (r3 + r5) | 0;
  r5 = r3 >> numDefine16;
  r8 = heapClassInst.heap32[r7 + numDefine3];
  r3 = r5 ^ r3;
  r5 = (r8 + -1) | 0;
  r3 = r3 & r5;
  r5 = heapClassInst.heap32[r7 + numDefine11];
  r3 = r3 << numDefine2;
  r8 = heapClassInst.heap32[fp + numDefine3];
  r5 = (r5 + r3) | 0;
  repeat1: while (true) {
    r5 = r5 >> numDefine2;
    r5 = heapClassInst.heap32[r5];
    if (r5 === -1) {
      label = numDefine33;
      break repeat1;
    } else {
      r9 = heapClassInst.heap32[r7 + numDefine4];
      r10 = r5 << numDefine4;
      r9 = (r9 + r10) | 0;
      r10 = r9 >> numDefine2;
      r11 = heapClassInst.heap32[r10];
      r11 = r11 >> numDefine2;
      r11 = heapClassInst.heap32[r11 + numDefine3];
      if (!(r11 !== r2)) {
        r11 = heapClassInst.heap32[r10 + 1];
        r11 = r11 >> numDefine2;
        r11 = heapClassInst.heap32[r11 + numDefine3];
        if (!(r11 !== r1)) {
          label = numDefine5;
          break repeat1;
        }
      }
      r9 = heapClassInst.heap32[r7 + numDefine16];
      r5 = r5 << numDefine2;
      r5 = (r9 + r5) | 0;
      continue repeat1;
    }
  }
  if (label === numDefine5) {
    r11 = heapClassInst.heap32[r7 + numDefine2];
    if (r11 > r5) {
      if (!(r9 === 0)) {
        r5 = heapClassInst.heap32[r7];
        r5 = r5 >> numDefine2;
        r5 = heapClassInst.heap32[r5 + numDefine8];
        heapClassInst.heap32[g0] = r6;
        heapClassInst.heap32[g0 + 1] = r9;
        heapClassInst.heap32[g0 + numDefine2] = r8;
        functionTable[r5 >> numDefine2](i7);
        r5 = heapClassInst.heap32[r10];
        r5 = r5 >> numDefine2;
        r5 = heapClassInst.heap32[r5 + numDefine3];
        if (r5 === r2) {
          r2 = heapClassInst.heap32[r10 + 1];
          r2 = r2 >> numDefine2;
          r2 = heapClassInst.heap32[r2 + numDefine3];
          if (r2 === r1) {
            r1 = heapClassInst.heap32[r7 + numDefine4];
            r1 = (r9 - r1) | 0;
            r1 = r1 >> numDefine4;
            r2 = heapClassInst.heap32[r7 + numDefine2];
            if (r2 > r1) {
              r2 = heapClassInst.heap32[r7 + numDefine11];
              r2 = (r2 + r3) | 0;
              r2 = r2 >> numDefine2;
              r3 = heapClassInst.heap32[r2];
              if (r3 === -1) {
                r0 = twoEStr727;
                r1 = twoEStr121;
                heapClassInst.heap32[g0] = r0;
                heapClassInst.heap32[g0 + 1] = r1;
                heapClassInst.heap32[g0 + numDefine2] = numDefine304;
                assertNew(i7);
              } else {
                r5 = heapClassInst.heap32[r10 + numDefine3];
                r6 = heapClassInst.heap32[r7 + numDefine16];
                if (r3 === r1) {
                  label = numDefine20;
                } else {
                  repeat22: while (true) {
                    r9 = r3;
                    r3 = r9 << numDefine2;
                    r3 = (r6 + r3) | 0;
                    r10 = r3 >> numDefine2;
                    r3 = heapClassInst.heap32[r10];
                    if (!(r3 !== r1)) {
                      break repeat22;
                    }
                  }
                  if (r9 === -1) {
                    label = numDefine20;
                  } else {
                    r2 = r1 << numDefine2;
                    r2 = (r6 + r2) | 0;
                    r2 = r2 >> numDefine2;
                    r2 = heapClassInst.heap32[r2];
                    heapClassInst.heap32[r10] = r2;
                    label = numDefine21;
                  }
                }
                if (label === numDefine20) {
                  r3 = r1 << numDefine2;
                  r3 = (r6 + r3) | 0;
                  r3 = r3 >> numDefine2;
                  r3 = heapClassInst.heap32[r3];
                  heapClassInst.heap32[r2] = r3;
                }
                r2 = heapClassInst.heap32[r7 + numDefine2];
                r3 = heapClassInst.heap32[r7 + numDefine18];
                if (!(r3 === 0)) {
                  r6 = r3 >> numDefine2;
                  r6 = heapClassInst.heap32[r6];
                  r6 = r6 >> numDefine2;
                  r6 = heapClassInst.heap32[r6 + numDefine3];
                  heapClassInst.heap32[g0] = r3;
                  heapClassInst.heap32[g0 + 1] = r0;
                  heapClassInst.heap32[g0 + numDefine2] = r4;
                  heapClassInst.heap32[g0 + numDefine3] = r8;
                  functionTable[r6 >> numDefine2](i7);
                }
                r0 = (r2 + -1) | 0;
                if (r0 !== r1) {
                  r3 = heapClassInst.heap32[r7 + numDefine4];
                  r4 = r2 << numDefine4;
                  r3 = (r3 + r4) | 0;
                  r3 = r3 >> numDefine2;
                  r6 = heapClassInst.heap32[r3 + numDefineNeg3];
                  r3 = heapClassInst.heap32[r3 + numDefineNeg4];
                  r6 = r6 >> numDefine2;
                  r3 = r3 >> numDefine2;
                  r6 = heapClassInst.heap32[r6 + numDefine3];
                  r3 = heapClassInst.heap32[r3 + numDefine3];
                  r6 = r6 << numDefine16;
                  r3 = r3 | r6;
                  r6 = r3 << numDefine15;
                  r6 = r6 ^ -1;
                  r3 = (r3 + r6) | 0;
                  r6 = r3 >> numDefine10;
                  r3 = r6 ^ r3;
                  r3 = (r3 * numDefine9) | 0;
                  r6 = r3 >> numDefine6;
                  r3 = r6 ^ r3;
                  r6 = r3 << numDefine11;
                  r6 = r6 ^ -1;
                  r3 = (r3 + r6) | 0;
                  r6 = r3 >> numDefine16;
                  r8 = heapClassInst.heap32[r7 + numDefine3];
                  r3 = r6 ^ r3;
                  r6 = (r8 + -1) | 0;
                  r3 = r3 & r6;
                  r6 = heapClassInst.heap32[r7 + numDefine11];
                  r3 = r3 << numDefine2;
                  r6 = (r6 + r3) | 0;
                  r6 = r6 >> numDefine2;
                  r8 = heapClassInst.heap32[r6];
                  if (r8 === -1) {
                    r0 = twoEStr727;
                    r1 = twoEStr121;
                    heapClassInst.heap32[g0] = r0;
                    heapClassInst.heap32[g0 + 1] = r1;
                    heapClassInst.heap32[g0 + numDefine2] = numDefine345;
                    assertNew(i7);
                  } else {
                    r9 = heapClassInst.heap32[r7 + numDefine16];
                    if (r8 === r0) {
                      label = numDefine31;
                    } else {
                      repeat38: while (true) {
                        r10 = r8;
                        r8 = r10 << numDefine2;
                        r8 = (r9 + r8) | 0;
                        r11 = r8 >> numDefine2;
                        r8 = heapClassInst.heap32[r11];
                        if (!(r8 !== r0)) {
                          break repeat38;
                        }
                      }
                      if (r10 === -1) {
                        label = numDefine31;
                      } else {
                        r2 = r2 << numDefine2;
                        r2 = (r9 + r2) | 0;
                        r2 = r2 >> numDefine2;
                        r2 = heapClassInst.heap32[r2 + -1];
                        heapClassInst.heap32[r11] = r2;
                        label = numDefine32;
                      }
                    }
                    if (label === numDefine31) {
                      r0 = r2 << numDefine2;
                      r0 = (r9 + r0) | 0;
                      r0 = r0 >> numDefine2;
                      r0 = heapClassInst.heap32[r0 + -1];
                      heapClassInst.heap32[r6] = r0;
                    }
                    r0 = heapClassInst.heap32[r7 + numDefine4];
                    r2 = (r0 + r4) | 0;
                    r4 = r1 << numDefine4;
                    r2 = r2 >> numDefine2;
                    r0 = (r0 + r4) | 0;
                    r4 = heapClassInst.heap32[r2 + numDefineNeg4];
                    r0 = r0 >> numDefine2;
                    heapClassInst.heap32[r0] = r4;
                    r4 = heapClassInst.heap32[r2 + numDefineNeg3];
                    heapClassInst.heap32[r0 + 1] = r4;
                    r4 = heapClassInst.heap32[r2 + numDefineNeg2];
                    heapClassInst.heap32[r0 + numDefine2] = r4;
                    r2 = heapClassInst.heap32[r2 + -1];
                    heapClassInst.heap32[r0 + numDefine3] = r2;
                    r0 = heapClassInst.heap32[r7 + numDefine11];
                    r0 = (r0 + r3) | 0;
                    r0 = r0 >> numDefine2;
                    r2 = r1 << numDefine2;
                    r4 = heapClassInst.heap32[r7 + numDefine16];
                    r2 = (r4 + r2) | 0;
                    r0 = heapClassInst.heap32[r0];
                    r2 = r2 >> numDefine2;
                    heapClassInst.heap32[r2] = r0;
                    r0 = heapClassInst.heap32[r7 + numDefine11];
                    r0 = (r0 + r3) | 0;
                    r0 = r0 >> numDefine2;
                    heapClassInst.heap32[r0] = r1;
                  }
                }
                r0 = heapClassInst.heap32[r7 + numDefine2];
                r0 = (r0 + -1) | 0;
                heapClassInst.heap32[r7 + numDefine2] = r0;
                commonVariable.rg0 = r5;
                return;
              }
            } else {
              r0 = twoEStr626;
              r1 = twoEStr121;
              heapClassInst.heap32[g0] = r0;
              heapClassInst.heap32[g0 + 1] = r1;
              heapClassInst.heap32[g0 + numDefine2] = numDefine300;
              assertNew(i7);
            }
          } else {
            r0 = twoEStr525;
            r3 = twoEStr121;
            heapClassInst.heap32[g0] = r0;
            heapClassInst.heap32[g0 + 1] = r3;
            heapClassInst.heap32[g0 + numDefine2] = numDefine297;
            assertNew(i7);
          }
        } else {
          r0 = twoEStr424;
          r1 = twoEStr121;
          heapClassInst.heap32[g0] = r0;
          heapClassInst.heap32[g0 + 1] = r1;
          heapClassInst.heap32[g0 + numDefine2] = numDefine296;
          assertNew(i7);
        }
      }
    } else {
      r0 = twoEStr222;
      r1 = twoEStr323;
      heapClassInst.heap32[g0] = r0;
      heapClassInst.heap32[g0 + 1] = r1;
      heapClassInst.heap32[g0 + numDefine2] = numDefine250;
      assertNew(i7);
    }
  }
  r0 = 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache8findPairEP17btBroadphaseProxyS1(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg16;
  let g0 = i7 >> numDefine2;
  r0 = gFindPairs;
  r0 = r0 >> numDefine2;
  r1 = heapClassInst.heap32[r0];
  r2 = heapClassInst.heap32[fp + 1];
  r3 = heapClassInst.heap32[fp + numDefine2];
  r1 = (r1 + 1) | 0;
  r4 = r2 >> numDefine2;
  heapClassInst.heap32[r0] = r1;
  r0 = r3 >> numDefine2;
  r1 = heapClassInst.heap32[r4 + numDefine3];
  r0 = heapClassInst.heap32[r0 + numDefine3];
  r4 = r1 > r0 ? r2 : r3;
  r0 = r1 > r0 ? r3 : r2;
  r1 = r4 >> numDefine2;
  r1 = heapClassInst.heap32[r1 + numDefine3];
  r0 = r0 >> numDefine2;
  r0 = heapClassInst.heap32[r0 + numDefine3];
  r2 = r1 << numDefine16;
  r2 = r2 | r0;
  r3 = r2 << numDefine15;
  r3 = r3 ^ -1;
  r2 = (r2 + r3) | 0;
  r3 = r2 >> numDefine10;
  r2 = r3 ^ r2;
  r2 = (r2 * numDefine9) | 0;
  r3 = r2 >> numDefine6;
  r2 = r3 ^ r2;
  r3 = r2 << numDefine11;
  r4 = heapClassInst.heap32[fp];
  r3 = r3 ^ -1;
  r4 = r4 >> numDefine2;
  r2 = (r2 + r3) | 0;
  r3 = r2 >> numDefine16;
  r5 = heapClassInst.heap32[r4 + numDefine3];
  r2 = r3 ^ r2;
  r3 = (r5 + -1) | 0;
  r2 = r2 & r3;
  r3 = heapClassInst.heap32[r4 + numDefine9];
  repeat1: do {
    if (!(r3 <= r2)) {
      r3 = heapClassInst.heap32[r4 + numDefine11];
      r2 = r2 << numDefine2;
      r2 = (r3 + r2) | 0;
      repeat3: while (true) {
        r2 = r2 >> numDefine2;
        r2 = heapClassInst.heap32[r2];
        if (r2 === -1) {
          break repeat1;
        } else {
          r3 = heapClassInst.heap32[r4 + numDefine4];
          r5 = r2 << numDefine4;
          r3 = (r3 + r5) | 0;
          r5 = r3 >> numDefine2;
          r6 = heapClassInst.heap32[r5];
          r6 = r6 >> numDefine2;
          r6 = heapClassInst.heap32[r6 + numDefine3];
          if (!(r6 !== r0)) {
            r5 = heapClassInst.heap32[r5 + 1];
            r5 = r5 >> numDefine2;
            r5 = heapClassInst.heap32[r5 + numDefine3];
            if (!(r5 !== r1)) {
              break repeat3;
            }
          }
          r3 = heapClassInst.heap32[r4 + numDefine16];
          r2 = r2 << numDefine2;
          r2 = (r3 + r2) | 0;
        }
      }
      r0 = heapClassInst.heap32[r4 + numDefine2];
      if (r0 > r2) {
        commonVariable.rg0 = r3;
        return;
      } else {
        r3 = twoEStr222;
        r0 = twoEStr121;
        heapClassInst.heap32[g0] = r3;
        heapClassInst.heap32[g0 + 1] = r0;
        heapClassInst.heap32[g0 + numDefine2] = numDefine165;
        assertNew(i7);
      }
    }
  } while (false);
  r0 = 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let r13: number = 0;
  let r14: number = 0;
  let r15: number = 0;
  let r16: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg40;
  let g0 = i7 >> numDefine2;
  r0 = sp + numDefineNeg24;
  r1 = 1;
  r2 = r0 >> numDefine2;
  heapClassInst.heap8[sp + numDefineNeg8] = r1;
  heapClassInst.heap32[r2 + numDefine3] = 0;
  r3 = heapClassInst.heap32[fp];
  heapClassInst.heap32[r2 + 1] = 0;
  r4 = r3 >> numDefine2;
  heapClassInst.heap32[r2 + numDefine2] = 0;
  r5 = heapClassInst.heap32[r4 + numDefine2];
  repeat1: do {
    if (r5 > 0) {
      r6 = heapClassInst.heap32[fp + 1];
      r7 = 0;
      r5 = r7;
      repeat3: while (true) {
        r8 = heapClassInst.heap32[r4 + numDefine4];
        if (r7 === r5) {
          r9 = 1;
          r10 = r5 << 1;
          r10 = r5 === 0 ? r9 : r10;
          if (!(r7 >= r10)) {
            if (r10 !== 0) {
              r7 = gNumAlignedAllocs;
              r7 = r7 >> numDefine2;
              r11 = heapClassInst.heap32[r7];
              r12 = r10 << numDefine4;
              r11 = (r11 + 1) | 0;
              r12 = r12 | numDefine3;
              heapClassInst.heap32[r7] = r11;
              r7 = (r12 + numDefine16) | 0;
              heapClassInst.heap32[g0] = r7;
              mallocNew(i7);
              r7 = commonVariable.rg0;
              if (r7 !== 0) {
                r11 = 0;
                r12 = (r7 + numDefine4) | 0;
                r11 = (r11 - r12) | 0;
                r11 = r11 & numDefine15;
                r11 = (r7 + r11) | 0;
                r12 = (r11 + numDefine4) | 0;
                r11 = r11 >> numDefine2;
                heapClassInst.heap32[r11] = r7;
                r7 = r12;
              }
            } else {
              r7 = 0;
            }
            if (r5 < 1) {
              r13 = heapClassInst.heap32[r2 + numDefine3];
            } else {
              r11 = 0;
              r12 = (r11 - r5) | 0;
              repeat16: while (true) {
                r13 = heapClassInst.heap32[r2 + numDefine3];
                r14 = r11 << numDefine4;
                r15 = (r13 - r14) | 0;
                r15 = r15 >> numDefine2;
                r14 = (r7 - r14) | 0;
                r16 = heapClassInst.heap32[r15];
                r14 = r14 >> numDefine2;
                heapClassInst.heap32[r14] = r16;
                r16 = heapClassInst.heap32[r15 + 1];
                heapClassInst.heap32[r14 + 1] = r16;
                r16 = heapClassInst.heap32[r15 + numDefine2];
                heapClassInst.heap32[r14 + numDefine2] = r16;
                r15 = heapClassInst.heap32[r15 + numDefine3];
                r11 = (r11 + -1) | 0;
                heapClassInst.heap32[r14 + numDefine3] = r15;
                if (!(r12 !== r11)) {
                  break repeat16;
                }
              }
            }
            if (r13 !== 0) {
              r11 = heapClassInst.heapU8[sp + numDefineNeg8];
              if (r11 !== 0) {
                r5 = gNumAlignedFree;
                r5 = r5 >> numDefine2;
                r11 = heapClassInst.heap32[r5];
                r11 = (r11 + 1) | 0;
                r12 = r13 >> numDefine2;
                heapClassInst.heap32[r5] = r11;
                r5 = heapClassInst.heap32[r12 + -1];
                heapClassInst.heap32[g0] = r5;
                free(i7);
                r5 = heapClassInst.heap32[r2 + 1];
              }
              heapClassInst.heap32[r2 + numDefine3] = 0;
            }
            heapClassInst.heap8[sp + numDefineNeg8] = r9;
            heapClassInst.heap32[r2 + numDefine3] = r7;
            heapClassInst.heap32[r2 + numDefine2] = r10;
          }
        }
        r7 = r1 << numDefine4;
        r7 = (r8 + r7) | 0;
        r7 = r7 >> numDefine2;
        r5 = r5 << numDefine4;
        r8 = heapClassInst.heap32[r2 + numDefine3];
        r5 = (r8 + r5) | 0;
        r8 = heapClassInst.heap32[r7 + numDefineNeg4];
        r5 = r5 >> numDefine2;
        heapClassInst.heap32[r5] = r8;
        r8 = heapClassInst.heap32[r7 + numDefineNeg3];
        heapClassInst.heap32[r5 + 1] = r8;
        r8 = heapClassInst.heap32[r7 + numDefineNeg2];
        heapClassInst.heap32[r5 + numDefine2] = r8;
        r7 = heapClassInst.heap32[r7 + -1];
        heapClassInst.heap32[r5 + numDefine3] = r7;
        r5 = heapClassInst.heap32[r2 + 1];
        r5 = (r5 + 1) | 0;
        heapClassInst.heap32[r2 + 1] = r5;
        r7 = heapClassInst.heap32[r4 + numDefine2];
        if (r7 <= r1) {
          break repeat3;
        } else {
          r7 = heapClassInst.heap32[r2 + numDefine2];
          r1 = (r1 + 1) | 0;
        }
      }
      if (r5 > 0) {
        r1 = 0;
        repeat29: while (true) {
          r5 = heapClassInst.heap32[r2 + numDefine3];
          r7 = r1 << numDefine4;
          r8 = heapClassInst.heap32[r4];
          r5 = (r5 + r7) | 0;
          r5 = r5 >> numDefine2;
          r7 = r8 >> numDefine2;
          r7 = heapClassInst.heap32[r7 + numDefine3];
          r8 = heapClassInst.heap32[r5 + 1];
          r5 = heapClassInst.heap32[r5];
          heapClassInst.heap32[g0] = r3;
          heapClassInst.heap32[g0 + 1] = r5;
          heapClassInst.heap32[g0 + numDefine2] = r8;
          heapClassInst.heap32[g0 + numDefine3] = r6;
          functionTable[r7 >> numDefine2](i7);
          r5 = heapClassInst.heap32[r2 + 1];
          r1 = (r1 + 1) | 0;
          if (r5 > r1) {
            continue repeat29;
          } else {
            break repeat1;
          }
        }
      }
    } else {
      r5 = 0;
    }
  } while (false);
  r1 = heapClassInst.heap32[r4 + numDefine14];
  if (r1 > 0) {
    r5 = 0;
    repeat35: while (true) {
      r1 = r5 << numDefine2;
      r6 = heapClassInst.heap32[r4 + numDefine16];
      r1 = (r6 + r1) | 0;
      r5 = (r5 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r1] = -1;
      r1 = heapClassInst.heap32[r4 + numDefine14];
      if (!(r1 > r5)) {
        break repeat35;
      }
    }
    r5 = heapClassInst.heap32[r2 + 1];
  }
  if (r5 > 1) {
    r5 = (r5 + -1) | 0;
    heapClassInst.heap32[g0] = r0;
    heapClassInst.heap32[g0 + 1] = 0;
    heapClassInst.heap32[g0 + numDefine2] = r5;
    zn20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvTIi(i7);
    r5 = heapClassInst.heap32[r2 + 1];
  }
  repeat42: do {
    if (!(r5 < 1)) {
      r0 = 0;
      repeat44: while (true) {
        r1 = heapClassInst.heap32[r2 + numDefine3];
        r5 = r0 << numDefine4;
        r6 = heapClassInst.heap32[r4];
        r1 = (r1 + r5) | 0;
        r1 = r1 >> numDefine2;
        r5 = r6 >> numDefine2;
        r5 = heapClassInst.heap32[r5 + numDefine2];
        r6 = heapClassInst.heap32[r1 + 1];
        r1 = heapClassInst.heap32[r1];
        heapClassInst.heap32[g0] = r3;
        heapClassInst.heap32[g0 + 1] = r1;
        heapClassInst.heap32[g0 + numDefine2] = r6;
        r0 = (r0 + 1) | 0;
        functionTable[r5 >> numDefine2](i7);
        r1 = heapClassInst.heap32[r2 + 1];
        if (r1 > r0) {
          continue repeat44;
        } else {
          break repeat42;
        }
      }
    }
  } while (false);
  r0 = heapClassInst.heap32[r2 + numDefine3];
  if (!(r0 === 0)) {
    r1 = heapClassInst.heapU8[sp + numDefineNeg8];
    if (!(r1 === 0)) {
      r1 = gNumAlignedFree;
      r1 = r1 >> numDefine2;
      r2 = heapClassInst.heap32[r1];
      r2 = (r2 + 1) | 0;
      r0 = r0 >> numDefine2;
      heapClassInst.heap32[r1] = r2;
      r0 = heapClassInst.heap32[r0 + -1];
      heapClassInst.heap32[g0] = r0;
      free(i7);
    }
  }
  return;
}

function zn20btAlignedObjectArrayI16btBroadphasePairE21expandNonInitializingEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let r12: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r1 + numDefine2];
  r3 = heapClassInst.heap32[r1 + 1];
  if (r2 === r3) {
    r4 = 1;
    r5 = r3 << 1;
    r5 = r3 === 0 ? r4 : r5;
    if (r2 >= r5) {
      label = 1;
    } else {
      if (r5 !== 0) {
        r2 = gNumAlignedAllocs;
        r2 = r2 >> numDefine2;
        r6 = heapClassInst.heap32[r2];
        r7 = r5 << numDefine4;
        r6 = (r6 + 1) | 0;
        r7 = r7 | numDefine3;
        heapClassInst.heap32[r2] = r6;
        r2 = (r7 + numDefine16) | 0;
        heapClassInst.heap32[g0] = r2;
        mallocNew(i7);
        r6 = commonVariable.rg0;
        if (r6 !== 0) {
          r2 = 0;
          r7 = (r6 + numDefine4) | 0;
          r2 = (r2 - r7) | 0;
          r2 = r2 & numDefine15;
          r2 = (r6 + r2) | 0;
          r7 = (r2 + numDefine4) | 0;
          r2 = r2 >> numDefine2;
          heapClassInst.heap32[r2] = r6;
          r6 = r7;
        }
      } else {
        r6 = 0;
      }
      r7 = (r0 + numDefine12) | 0;
      if (r3 < 1) {
        r2 = r7 >> numDefine2;
        r9 = heapClassInst.heap32[r2];
      } else {
        r2 = 0;
        r8 = (r2 - r3) | 0;
        repeat12: while (true) {
          r9 = r7 >> numDefine2;
          r9 = heapClassInst.heap32[r9];
          r10 = r2 << numDefine4;
          r11 = (r9 - r10) | 0;
          r11 = r11 >> numDefine2;
          r10 = (r6 - r10) | 0;
          r12 = heapClassInst.heap32[r11];
          r10 = r10 >> numDefine2;
          heapClassInst.heap32[r10] = r12;
          r12 = heapClassInst.heap32[r11 + 1];
          heapClassInst.heap32[r10 + 1] = r12;
          r12 = heapClassInst.heap32[r11 + numDefine2];
          heapClassInst.heap32[r10 + numDefine2] = r12;
          r11 = heapClassInst.heap32[r11 + numDefine3];
          r2 = (r2 + -1) | 0;
          heapClassInst.heap32[r10 + numDefine3] = r11;
          if (!(r8 !== r2)) {
            break repeat12;
          }
        }
        r7 = (r0 + numDefine12) | 0;
      }
      if (r9 !== 0) {
        r2 = heapClassInst.heapU8[r0 + numDefine16];
        if (r2 !== 0) {
          r2 = gNumAlignedFree;
          r2 = r2 >> numDefine2;
          r8 = heapClassInst.heap32[r2];
          r8 = (r8 + 1) | 0;
          r9 = r9 >> numDefine2;
          heapClassInst.heap32[r2] = r8;
          r2 = heapClassInst.heap32[r9 + -1];
          heapClassInst.heap32[g0] = r2;
          free(i7);
          r2 = heapClassInst.heap32[r1 + 1];
        } else {
          r2 = r3;
        }
        r8 = r7 >> numDefine2;
        heapClassInst.heap32[r8] = 0;
      } else {
        r2 = r3;
      }
      r7 = r7 >> numDefine2;
      heapClassInst.heap8[r0 + numDefine16] = r4;
      heapClassInst.heap32[r7] = r6;
      heapClassInst.heap32[r1 + numDefine2] = r5;
      label = numDefine19;
    }
  } else {
    label = 1;
  }
  if (label === 1) {
    r2 = r3;
  }
  r0 = (r2 + 1) | 0;
  heapClassInst.heap32[r1 + 1] = r0;
  r0 = heapClassInst.heap32[r1 + numDefine3];
  r1 = r3 << numDefine4;
  r0 = (r0 + r1) | 0;
  commonVariable.rg0 = r0;
  return;
}

function zn28btHashedOverlappingPairCache10growTablesEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = r0 >> numDefine2;
  r2 = heapClassInst.heap32[r1 + numDefine9];
  r3 = heapClassInst.heap32[r1 + numDefine3];
  repeat1: do {
    if (!(r2 >= r3)) {
      repeat3: do {
        if (!(r2 > r3)) {
          r4 = heapClassInst.heap32[r1 + numDefine10];
          if (!(r4 >= r3)) {
            if (r3 !== 0) {
              r4 = gNumAlignedAllocs;
              r4 = r4 >> numDefine2;
              r5 = heapClassInst.heap32[r4];
              r6 = r3 << numDefine2;
              r5 = (r5 + 1) | 0;
              r6 = r6 | numDefine3;
              heapClassInst.heap32[r4] = r5;
              r4 = (r6 + numDefine16) | 0;
              heapClassInst.heap32[g0] = r4;
              mallocNew(i7);
              r4 = commonVariable.rg0;
              if (r4 !== 0) {
                r5 = 0;
                r6 = (r4 + numDefine4) | 0;
                r5 = (r5 - r6) | 0;
                r5 = r5 & numDefine15;
                r5 = (r4 + r5) | 0;
                r6 = (r5 + numDefine4) | 0;
                r5 = r5 >> numDefine2;
                heapClassInst.heap32[r5] = r4;
                r4 = r6;
              }
            } else {
              r4 = 0;
            }
            r5 = (r0 + numDefine44) | 0;
            if (r2 < 1) {
              r6 = r5 >> numDefine2;
              r7 = heapClassInst.heap32[r6];
            } else {
              r6 = 0;
              repeat15: while (true) {
                r7 = r5 >> numDefine2;
                r7 = heapClassInst.heap32[r7];
                r8 = r6 << numDefine2;
                r9 = (r7 + r8) | 0;
                r9 = r9 >> numDefine2;
                r8 = (r4 + r8) | 0;
                r9 = heapClassInst.heap32[r9];
                r6 = (r6 + 1) | 0;
                r8 = r8 >> numDefine2;
                heapClassInst.heap32[r8] = r9;
                if (!(r2 !== r6)) {
                  break repeat15;
                }
              }
              r5 = (r0 + numDefine44) | 0;
            }
            if (!(r7 === 0)) {
              r6 = heapClassInst.heapU8[r0 + numDefine48];
              if (!(r6 === 0)) {
                r6 = gNumAlignedFree;
                r6 = r6 >> numDefine2;
                r8 = heapClassInst.heap32[r6];
                r8 = (r8 + 1) | 0;
                r7 = r7 >> numDefine2;
                heapClassInst.heap32[r6] = r8;
                r6 = heapClassInst.heap32[r7 + -1];
                heapClassInst.heap32[g0] = r6;
                free(i7);
              }
              r6 = r5 >> numDefine2;
              heapClassInst.heap32[r6] = 0;
            }
            r6 = 1;
            r5 = r5 >> numDefine2;
            heapClassInst.heap8[r0 + numDefine48] = r6;
            heapClassInst.heap32[r5] = r4;
            heapClassInst.heap32[r1 + numDefine10] = r3;
          }
          r4 = r2;
          while (true) {
            r5 = r4 << numDefine2;
            r6 = heapClassInst.heap32[r1 + numDefine11];
            r5 = (r6 + r5) | 0;
            r4 = (r4 + 1) | 0;
            r5 = r5 >> numDefine2;
            heapClassInst.heap32[r5] = 0;
            if (!(r3 !== r4)) {
              break repeat3;
            }
          }
        }
      } while (false);
      heapClassInst.heap32[r1 + numDefine9] = r3;
      r4 = heapClassInst.heap32[r1 + numDefine14];
      repeat29: do {
        if (!(r4 > r3)) {
          if (!(r4 >= r3)) {
            r5 = heapClassInst.heap32[r1 + numDefine15];
            if (!(r5 >= r3)) {
              if (r3 !== 0) {
                r5 = gNumAlignedAllocs;
                r5 = r5 >> numDefine2;
                r6 = heapClassInst.heap32[r5];
                r7 = r3 << numDefine2;
                r6 = (r6 + 1) | 0;
                r7 = r7 | numDefine3;
                heapClassInst.heap32[r5] = r6;
                r5 = (r7 + numDefine16) | 0;
                heapClassInst.heap32[g0] = r5;
                mallocNew(i7);
                r5 = commonVariable.rg0;
                if (r5 !== 0) {
                  r6 = 0;
                  r7 = (r5 + numDefine4) | 0;
                  r6 = (r6 - r7) | 0;
                  r6 = r6 & numDefine15;
                  r6 = (r5 + r6) | 0;
                  r7 = (r6 + numDefine4) | 0;
                  r6 = r6 >> numDefine2;
                  heapClassInst.heap32[r6] = r5;
                  r5 = r7;
                }
              } else {
                r5 = 0;
              }
              r6 = (r0 + numDefine64) | 0;
              if (r4 < 1) {
                r7 = r6 >> numDefine2;
                r8 = heapClassInst.heap32[r7];
              } else {
                r7 = 0;
                repeat42: while (true) {
                  r8 = r6 >> numDefine2;
                  r8 = heapClassInst.heap32[r8];
                  r9 = r7 << numDefine2;
                  r10 = (r8 + r9) | 0;
                  r10 = r10 >> numDefine2;
                  r9 = (r5 + r9) | 0;
                  r10 = heapClassInst.heap32[r10];
                  r7 = (r7 + 1) | 0;
                  r9 = r9 >> numDefine2;
                  heapClassInst.heap32[r9] = r10;
                  if (!(r4 !== r7)) {
                    break repeat42;
                  }
                }
                r6 = (r0 + numDefine64) | 0;
              }
              if (!(r8 === 0)) {
                r7 = heapClassInst.heapU8[r0 + numDefine68];
                if (!(r7 === 0)) {
                  r7 = gNumAlignedFree;
                  r7 = r7 >> numDefine2;
                  r9 = heapClassInst.heap32[r7];
                  r9 = (r9 + 1) | 0;
                  r8 = r8 >> numDefine2;
                  heapClassInst.heap32[r7] = r9;
                  r7 = heapClassInst.heap32[r8 + -1];
                  heapClassInst.heap32[g0] = r7;
                  free(i7);
                }
                r7 = r6 >> numDefine2;
                heapClassInst.heap32[r7] = 0;
              }
              r7 = 1;
              r6 = r6 >> numDefine2;
              heapClassInst.heap8[r0 + numDefine68] = r7;
              heapClassInst.heap32[r6] = r5;
              heapClassInst.heap32[r1 + numDefine15] = r3;
              if (r4 >= r3) {
                break repeat29;
              }
            }
            while (true) {
              r0 = r4 << numDefine2;
              r5 = heapClassInst.heap32[r1 + numDefine16];
              r0 = (r5 + r0) | 0;
              r4 = (r4 + 1) | 0;
              r0 = r0 >> numDefine2;
              heapClassInst.heap32[r0] = 0;
              if (!(r3 !== r4)) {
                break repeat29;
              }
            }
          }
        }
      } while (false);
      heapClassInst.heap32[r1 + numDefine14] = r3;
      repeat55: do {
        if (!(r3 < 1)) {
          r0 = 0;
          repeat57: while (true) {
            r4 = r0 << numDefine2;
            r5 = heapClassInst.heap32[r1 + numDefine11];
            r4 = (r5 + r4) | 0;
            r0 = (r0 + 1) | 0;
            r4 = r4 >> numDefine2;
            heapClassInst.heap32[r4] = -1;
            if (!(r3 !== r0)) {
              break repeat57;
            }
          }
          if (!(r3 < 1)) {
            r0 = 0;
            while (true) {
              r4 = r0 << numDefine2;
              r5 = heapClassInst.heap32[r1 + numDefine16];
              r4 = (r5 + r4) | 0;
              r0 = (r0 + 1) | 0;
              r4 = r4 >> numDefine2;
              heapClassInst.heap32[r4] = -1;
              if (!(r3 !== r0)) {
                break repeat55;
              }
            }
          }
        }
      } while (false);
      if (!(r2 < 1)) {
        r0 = 0;
        repeat65: while (true) {
          r3 = heapClassInst.heap32[r1 + numDefine4];
          r4 = r0 << numDefine4;
          r3 = (r3 + r4) | 0;
          r3 = r3 >> numDefine2;
          r4 = heapClassInst.heap32[r3 + 1];
          r3 = heapClassInst.heap32[r3];
          r4 = r4 >> numDefine2;
          r3 = r3 >> numDefine2;
          r4 = heapClassInst.heap32[r4 + numDefine3];
          r4 = r4 << numDefine16;
          r3 = heapClassInst.heap32[r3 + numDefine3];
          r3 = r4 | r3;
          r4 = r3 << numDefine15;
          r4 = r4 ^ -1;
          r3 = (r3 + r4) | 0;
          r4 = r3 >> numDefine10;
          r3 = r4 ^ r3;
          r3 = (r3 * numDefine9) | 0;
          r4 = r3 >> numDefine6;
          r3 = r4 ^ r3;
          r4 = r3 << numDefine11;
          r4 = r4 ^ -1;
          r3 = (r3 + r4) | 0;
          r4 = r3 >> numDefine16;
          r5 = heapClassInst.heap32[r1 + numDefine3];
          r3 = r4 ^ r3;
          r4 = (r5 + -1) | 0;
          r3 = r3 & r4;
          r3 = r3 << numDefine2;
          r4 = heapClassInst.heap32[r1 + numDefine11];
          r4 = (r4 + r3) | 0;
          r4 = r4 >> numDefine2;
          r5 = r0 << numDefine2;
          r6 = heapClassInst.heap32[r1 + numDefine16];
          r5 = (r6 + r5) | 0;
          r4 = heapClassInst.heap32[r4];
          r5 = r5 >> numDefine2;
          heapClassInst.heap32[r5] = r4;
          r4 = heapClassInst.heap32[r1 + numDefine11];
          r3 = (r4 + r3) | 0;
          r4 = (r0 + 1) | 0;
          r3 = r3 >> numDefine2;
          heapClassInst.heap32[r3] = r0;
          r0 = r4;
          if (r2 !== r4) {
            continue repeat65;
          } else {
            break repeat1;
          }
        }
      }
    }
  } while (false);
  return;
}

function zn28btHashedOverlappingPairCacheC1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv28btHashedOverlappingPairCache;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  r3 = 1;
  heapClassInst.heap32[r2] = r1;
  heapClassInst.heap8[r0 + numDefine20] = r3;
  heapClassInst.heap32[r2 + numDefine4] = 0;
  heapClassInst.heap32[r2 + numDefine2] = 0;
  heapClassInst.heap32[r2 + numDefine3] = 0;
  r1 = 0;
  heapClassInst.heap32[r2 + numDefine6] = 0;
  heapClassInst.heap8[r0 + numDefine28] = r1;
  heapClassInst.heap8[r0 + numDefine48] = r3;
  heapClassInst.heap32[r2 + numDefine11] = 0;
  heapClassInst.heap32[r2 + numDefine9] = 0;
  heapClassInst.heap32[r2 + numDefine10] = 0;
  heapClassInst.heap8[r0 + numDefine68] = r3;
  heapClassInst.heap32[r2 + numDefine16] = 0;
  heapClassInst.heap32[r2 + numDefine14] = 0;
  r4 = gNumAlignedAllocs;
  heapClassInst.heap32[r2 + numDefine15] = 0;
  r4 = r4 >> numDefine2;
  heapClassInst.heap32[r2 + numDefine18] = 0;
  r5 = heapClassInst.heap32[r4];
  r5 = (r5 + 1) | 0;
  heapClassInst.heap32[r4] = r5;
  heapClassInst.heap32[g0] = numDefine51;
  mallocNew(i7);
  r4 = commonVariable.rg0;
  if (r4 !== 0) {
    r5 = (r4 + numDefine4) | 0;
    r1 = (r1 - r5) | 0;
    r1 = r1 & numDefine15;
    r1 = (r4 + r1) | 0;
    r5 = (r1 + numDefine4) | 0;
    r1 = r1 >> numDefine2;
    heapClassInst.heap32[r1] = r4;
    r4 = r5;
  }
  heapClassInst.heap8[r0 + numDefine20] = r3;
  heapClassInst.heap32[r2 + numDefine4] = r4;
  heapClassInst.heap32[r2 + numDefine3] = numDefine2;
  heapClassInst.heap32[g0] = r0;
  zn28btHashedOverlappingPairCache10growTablesEv(i7);
  return;
}

function znk14btQuantizedBvh31calculateSerializeBufferSizeNewEv(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + 0;
  let g0 = i7 >> numDefine2;
  r0 = numDefine84;
  commonVariable.rg0 = r0;
  return;
}

function znk14btQuantizedBvh9serializeEPvP12btSerializer(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let r6: number = 0;
  let r7: number = 0;
  let r8: number = 0;
  let r9: number = 0;
  let r10: number = 0;
  let r11: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg24;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp + 1];
  r1 = heapClassInst.heap32[fp];
  r0 = r0 >> numDefine2;
  r2 = r1 >> numDefine2;
  heapClassInst.heap32[r0 + numDefine4] = heapClassInst.heap32[r2 + numDefine5];
  heapClassInst.heap32[r0 + numDefine5] = heapClassInst.heap32[r2 + numDefine6];
  heapClassInst.heap32[r0 + numDefine6] = heapClassInst.heap32[r2 + numDefine7];
  heapClassInst.heap32[r0 + numDefine7] = heapClassInst.heap32[r2 + numDefine8];
  heapClassInst.heap32[r0] = heapClassInst.heap32[r2 + 1];
  heapClassInst.heap32[r0 + 1] = heapClassInst.heap32[r2 + numDefine2];
  heapClassInst.heap32[r0 + numDefine2] = heapClassInst.heap32[r2 + numDefine3];
  heapClassInst.heap32[r0 + numDefine3] = heapClassInst.heap32[r2 + numDefine4];
  heapClassInst.heap32[r0 + numDefine8] = heapClassInst.heap32[r2 + numDefine9];
  heapClassInst.heap32[r0 + numDefine9] = heapClassInst.heap32[r2 + numDefine10];
  heapClassInst.heap32[r0 + numDefine10] = heapClassInst.heap32[r2 + numDefine11];
  heapClassInst.heap32[r0 + numDefine11] = heapClassInst.heap32[r2 + numDefine12];
  r3 = heapClassInst.heap32[r2 + numDefine14];
  heapClassInst.heap32[r0 + numDefine12] = r3;
  r1 = heapClassInst.heapU8[r1 + numDefine60];
  heapClassInst.heap32[r0 + numDefine13] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine22];
  r3 = heapClassInst.heap32[fp + numDefine2];
  heapClassInst.heap32[r0 + numDefine14] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine22];
  if (r1 !== 0) {
    r1 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r1];
    r4 = r4 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + numDefine7];
    r5 = heapClassInst.heap32[r2 + numDefine24];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r5;
    functionTable[r4 >> numDefine2](i7);
    r4 = commonVariable.rg0;
    heapClassInst.heap32[r0 + numDefine16] = r4;
    if (!(r4 === 0)) {
      r4 = heapClassInst.heap32[r1];
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r2 + numDefine22];
      r4 = heapClassInst.heap32[r4 + numDefine4];
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = numDefine48;
      heapClassInst.heap32[g0 + numDefine2] = r5;
      functionTable[r4 >> numDefine2](i7);
      r4 = commonVariable.rg0;
      if (!(r5 < 1)) {
        r6 = r4 >> numDefine2;
        r7 = 0;
        r6 = heapClassInst.heap32[r6 + numDefine2];
        r5 = (r7 - r5) | 0;
        repeat6: while (true) {
          r8 = (r7 * numDefineNeg12) | 0;
          r8 = r8 << numDefine2;
          r9 = r7 << numDefine6;
          r10 = heapClassInst.heap32[r2 + numDefine24];
          r8 = (r6 + r8) | 0;
          r10 = (r10 - r9) | 0;
          r8 = r8 >> numDefine2;
          r10 = r10 >> numDefine2;
          heapClassInst.heap32[r8 + numDefine4] = heapClassInst.heap32[r10 + numDefine4];
          heapClassInst.heap32[r8 + numDefine5] = heapClassInst.heap32[r10 + numDefine5];
          heapClassInst.heap32[r8 + numDefine6] = heapClassInst.heap32[r10 + numDefine6];
          heapClassInst.heap32[r8 + numDefine7] = heapClassInst.heap32[r10 + numDefine7];
          r10 = heapClassInst.heap32[r2 + numDefine24];
          r10 = (r10 - r9) | 0;
          r10 = r10 >> numDefine2;
          heapClassInst.heap32[r8] = heapClassInst.heap32[r10];
          heapClassInst.heap32[r8 + 1] = heapClassInst.heap32[r10 + 1];
          heapClassInst.heap32[r8 + numDefine2] = heapClassInst.heap32[r10 + numDefine2];
          heapClassInst.heap32[r8 + numDefine3] = heapClassInst.heap32[r10 + numDefine3];
          r10 = heapClassInst.heap32[r2 + numDefine24];
          r10 = (r10 - r9) | 0;
          r10 = r10 >> numDefine2;
          r10 = heapClassInst.heap32[r10 + numDefine8];
          heapClassInst.heap32[r8 + numDefine8] = r10;
          r10 = heapClassInst.heap32[r2 + numDefine24];
          r10 = (r10 - r9) | 0;
          r10 = r10 >> numDefine2;
          r10 = heapClassInst.heap32[r10 + numDefine9];
          heapClassInst.heap32[r8 + numDefine9] = r10;
          r10 = heapClassInst.heap32[r2 + numDefine24];
          r9 = (r10 - r9) | 0;
          r9 = r9 >> numDefine2;
          r9 = heapClassInst.heap32[r9 + numDefine10];
          r7 = (r7 + -1) | 0;
          heapClassInst.heap32[r8 + numDefine10] = r9;
          if (!(r5 !== r7)) {
            break repeat6;
          }
        }
      }
      r1 = heapClassInst.heap32[r1];
      r1 = r1 >> numDefine2;
      r1 = heapClassInst.heap32[r1 + numDefine5];
      r5 = heapClassInst.heap32[r2 + numDefine24];
      r6 = twoEStr32;
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r4;
      heapClassInst.heap32[g0 + numDefine2] = r6;
      heapClassInst.heap32[g0 + numDefine3] = numDefine53121;
      heapClassInst.heap32[g0 + numDefine4] = r5;
      functionTable[r1 >> numDefine2](i7);
    }
  } else {
    heapClassInst.heap32[r0 + numDefine16] = 0;
  }
  r1 = heapClassInst.heap32[r2 + numDefine32];
  heapClassInst.heap32[r0 + numDefine15] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine32];
  if (r1 !== 0) {
    r1 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r1];
    r4 = r4 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + numDefine7];
    r5 = heapClassInst.heap32[r2 + numDefine34];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r5;
    functionTable[r4 >> numDefine2](i7);
    r4 = commonVariable.rg0;
    heapClassInst.heap32[r0 + numDefine17] = r4;
    if (!(r4 === 0)) {
      r4 = heapClassInst.heap32[r1];
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r2 + numDefine32];
      r4 = heapClassInst.heap32[r4 + numDefine4];
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = numDefine16;
      heapClassInst.heap32[g0 + numDefine2] = r5;
      functionTable[r4 >> numDefine2](i7);
      r4 = commonVariable.rg0;
      repeat14: do {
        if (!(r5 < 1)) {
          r6 = r4 >> numDefine2;
          r7 = 0;
          r6 = heapClassInst.heap32[r6 + numDefine2];
          r5 = (r7 - r5) | 0;
          while (true) {
            r8 = r7 << numDefine4;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = r9 >> numDefine2;
            r10 = (r6 - r8) | 0;
            r9 = heapClassInst.heap32[r9 + numDefine3];
            r11 = r10 >> numDefine2;
            heapClassInst.heap32[r11 + numDefine3] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = heapClassInst.heapU16[(r9 + numDefine6) >> 1];
            heapClassInst.heap16[(r10 + numDefine6) >> 1] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = heapClassInst.heapU16[(r9 + numDefine8) >> 1];
            heapClassInst.heap16[(r10 + numDefine8) >> 1] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = heapClassInst.heapU16[(r9 + numDefine10) >> 1];
            heapClassInst.heap16[(r10 + numDefine10) >> 1] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = heapClassInst.heapU16[r9 >> 1];
            heapClassInst.heap16[r10 >> 1] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r9 = (r9 - r8) | 0;
            r9 = heapClassInst.heapU16[(r9 + numDefine2) >> 1];
            heapClassInst.heap16[(r10 + numDefine2) >> 1] = r9;
            r9 = heapClassInst.heap32[r2 + numDefine34];
            r8 = (r9 - r8) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine4) >> 1];
            r7 = (r7 + -1) | 0;
            heapClassInst.heap16[(r10 + numDefine4) >> 1] = r8;
            if (!(r5 !== r7)) {
              break repeat14;
            }
          }
        }
      } while (false);
      r1 = heapClassInst.heap32[r1];
      r1 = r1 >> numDefine2;
      r1 = heapClassInst.heap32[r1 + numDefine5];
      r5 = heapClassInst.heap32[r2 + numDefine34];
      r6 = twoEStr133;
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r4;
      heapClassInst.heap32[g0 + numDefine2] = r6;
      heapClassInst.heap32[g0 + numDefine3] = numDefine53121;
      heapClassInst.heap32[g0 + numDefine4] = r5;
      functionTable[r1 >> numDefine2](i7);
    }
  } else {
    heapClassInst.heap32[r0 + numDefine17] = 0;
  }
  r1 = heapClassInst.heap32[r2 + numDefine36];
  heapClassInst.heap32[r0 + numDefine19] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine38];
  heapClassInst.heap32[r0 + numDefine20] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine38];
  if (r1 !== 0) {
    r1 = r3 >> numDefine2;
    r4 = heapClassInst.heap32[r1];
    r4 = r4 >> numDefine2;
    r4 = heapClassInst.heap32[r4 + numDefine7];
    r5 = heapClassInst.heap32[r2 + numDefine40];
    heapClassInst.heap32[g0] = r3;
    heapClassInst.heap32[g0 + 1] = r5;
    functionTable[r4 >> numDefine2](i7);
    r4 = commonVariable.rg0;
    heapClassInst.heap32[r0 + numDefine18] = r4;
    if (!(r4 === 0)) {
      r0 = heapClassInst.heap32[r1];
      r0 = r0 >> numDefine2;
      r4 = heapClassInst.heap32[r2 + numDefine38];
      r0 = heapClassInst.heap32[r0 + numDefine4];
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = numDefine20;
      heapClassInst.heap32[g0 + numDefine2] = r4;
      functionTable[r0 >> numDefine2](i7);
      r0 = commonVariable.rg0;
      repeat24: do {
        if (!(r4 < 1)) {
          r5 = r0 >> numDefine2;
          r6 = 0;
          r5 = heapClassInst.heap32[r5 + numDefine2];
          r4 = (r6 - r4) | 0;
          while (true) {
            r7 = r6 << numDefine5;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r9 = (r6 * numDefineNeg10) | 0;
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine6) >> 1];
            r9 = r9 << 1;
            r9 = (r5 + r9) | 0;
            heapClassInst.heap16[(r9 + numDefine14) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine8) >> 1];
            heapClassInst.heap16[(r9 + numDefine16) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine10) >> 1];
            heapClassInst.heap16[(r9 + numDefine18) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[r8 >> 1];
            heapClassInst.heap16[(r9 + numDefine8) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine2) >> 1];
            heapClassInst.heap16[(r9 + numDefine10) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r8 = (r8 - r7) | 0;
            r8 = heapClassInst.heapU16[(r8 + numDefine4) >> 1];
            heapClassInst.heap16[(r9 + numDefine12) >> 1] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r9 = (r6 * numDefineNeg5) | 0;
            r8 = (r8 - r7) | 0;
            r9 = r9 << numDefine2;
            r8 = r8 >> numDefine2;
            r9 = (r5 + r9) | 0;
            r8 = heapClassInst.heap32[r8 + numDefine3];
            r9 = r9 >> numDefine2;
            heapClassInst.heap32[r9] = r8;
            r8 = heapClassInst.heap32[r2 + numDefine40];
            r7 = (r8 - r7) | 0;
            r7 = r7 >> numDefine2;
            r7 = heapClassInst.heap32[r7 + numDefine4];
            r6 = (r6 + -1) | 0;
            heapClassInst.heap32[r9 + 1] = r7;
            if (!(r4 !== r6)) {
              break repeat24;
            }
          }
        }
      } while (false);
      r1 = heapClassInst.heap32[r1];
      r1 = r1 >> numDefine2;
      r1 = heapClassInst.heap32[r1 + numDefine5];
      r2 = heapClassInst.heap32[r2 + numDefine40];
      r4 = twoEStr234;
      heapClassInst.heap32[g0] = r3;
      heapClassInst.heap32[g0 + 1] = r0;
      heapClassInst.heap32[g0 + numDefine2] = r4;
      heapClassInst.heap32[g0 + numDefine3] = numDefine53121;
      heapClassInst.heap32[g0 + numDefine4] = r2;
      functionTable[r1 >> numDefine2](i7);
    }
  } else {
    heapClassInst.heap32[r0 + numDefine18] = 0;
  }
  r0 = twoEStr335;
  commonVariable.rg0 = r0;
  return;
}

function zn14btQuantizedBvhD1Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  heapClassInst.heap32[g0] = r0;
  zn14btQuantizedBvhD2Ev(i7);
  return;
}

function zn14btQuantizedBvhD0Ev(sp: number): void {
  let i7: number = 0;
  let fp = sp >> numDefine2;
  let r0: number = 0;
  let r1: number = 0;
  let r2: number = 0;
  let r3: number = 0;
  let r4: number = 0;
  let r5: number = 0;
  let label = 0;
  i7 = sp + numDefineNeg8;
  let g0 = i7 >> numDefine2;
  r0 = heapClassInst.heap32[fp];
  r1 = ztv14btQuantizedBvh;
  r2 = r0 >> numDefine2;
  r1 = (r1 + numDefine8) | 0;
  heapClassInst.heap32[r2] = r1;
  r1 = heapClassInst.heap32[r2 + numDefine40];
  if (!(r1 === 0)) {
    r3 = heapClassInst.heapU8[r0 + numDefine164];
    if (!(r3 === 0)) {
      r3 = gNumAlignedFree;
      r3 = r3 >> numDefine2;
      r4 = heapClassInst.heap32[r3];
      r4 = (r4 + 1) | 0;
      r1 = r1 >> numDefine2;
      heapClassInst.heap32[r3] = r4;
      r1 = heapClassInst.heap32[r1 + -1];
      heapClassInst.heap32[g0] = r1;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine40] = 0;
  }
  r1 = 1;
  heapClassInst.heap8[r0 + numDefine164] = r1;
  heapClassInst.heap32[r2 + numDefine40] = 0;
  heapClassInst.heap32[r2 + numDefine38] = 0;
  heapClassInst.heap32[r2 + numDefine39] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine34];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine140];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine34] = 0;
  }
  heapClassInst.heap8[r0 + numDefine140] = r1;
  heapClassInst.heap32[r2 + numDefine34] = 0;
  heapClassInst.heap32[r2 + numDefine32] = 0;
  heapClassInst.heap32[r2 + numDefine33] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine29];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine120];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine29] = 0;
  }
  heapClassInst.heap8[r0 + numDefine120] = r1;
  heapClassInst.heap32[r2 + numDefine29] = 0;
  heapClassInst.heap32[r2 + numDefine27] = 0;
  heapClassInst.heap32[r2 + numDefine28] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine24];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine100];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine24] = 0;
  }
  heapClassInst.heap8[r0 + numDefine100] = r1;
  heapClassInst.heap32[r2 + numDefine24] = 0;
  heapClassInst.heap32[r2 + numDefine22] = 0;
  heapClassInst.heap32[r2 + numDefine23] = 0;
  r3 = heapClassInst.heap32[r2 + numDefine19];
  if (!(r3 === 0)) {
    r4 = heapClassInst.heapU8[r0 + numDefine80];
    if (!(r4 === 0)) {
      r4 = gNumAlignedFree;
      r4 = r4 >> numDefine2;
      r5 = heapClassInst.heap32[r4];
      r5 = (r5 + 1) | 0;
      r3 = r3 >> numDefine2;
      heapClassInst.heap32[r4] = r5;
      r3 = heapClassInst.heap32[r3 + -1];
      heapClassInst.heap32[g0] = r3;
      free(i7);
    }
    heapClassInst.heap32[r2 + numDefine19] = 0;
  }
  heapClassInst.heap8[r0 + numDefine80] = r1;
  heapClassInst.heap32[r2 + numDefine19] = 0;
  heapClassInst.heap32[r2 + numDefine17] = 0;
  heapClassInst.heap32[r2 + numDefine18] = 0;
  if (!(r0 === 0)) {
    r0 = gNumAlignedFree;
    r0 = r0 >> numDefine2;
    r1 = heapClassInst.heap32[r0];
    r1 = (r1 + 1) | 0;
    heapClassInst.heap32[r0] = r1;
    r0 = heapClassInst.heap32[r2 + -1];
    heapClassInst.heap32[g0] = r0;
    free(i7);
  }
  return;
}

export { zn20btAxisSweep3InternalItE11createProxyERK9btVector3S3IPvssP12btDispatcherS4 };

export { zn20btAxisSweep3InternalItE25calculateOverlappingPairsEP12btDispatcher, zn20btAxisSweep3InternalItED1Ev };

export { zn20btAxisSweep3InternalItED0Ev, zn12btAxisSweep3D0Ev, zn12btAxisSweep3D1Ev, zn20btCollisionAlgorithmD1Ev };

export { zn20btCollisionAlgorithmD0Ev, zn6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3 };

export { zn6btDbvt8ICollide7ProcessEPK10btDbvtNodef, zn6btDbvt8ICollide7DescentEPK10btDbvtNode };

export { zn6btDbvt8ICollide9AllLeavesEPK10btDbvtNode, zn18btDbvtTreeColliderD1Ev, zn18btDbvtTreeColliderD0Ev };

export { zn18btDbvtTreeCollider7ProcessEPK10btDbvtNodeS2, zn18btDbvtTreeCollider7ProcessEPK10btDbvtNode };

export { znk16btDbvtBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3, zn19BroadphaseRayTesterD1Ev };

export { zn19BroadphaseRayTesterD0Ev, zn19BroadphaseRayTester7ProcessEPK10btDbvtNode, zn20BroadphaseAabbTesterD1Ev };

export { zn20BroadphaseAabbTesterD0Ev, zn20BroadphaseAabbTester7ProcessEPK10btDbvtNode };

export { zn16btDbvtBroadphase23getOverlappingPairCacheEv, znk16btDbvtBroadphase23getOverlappingPairCacheEv };

export { znk16btDbvtBroadphase17getBroadphaseAabbER9btVector3S1, zn16btDbvtBroadphase10printStatsEv };

export { zn16btDbvtBroadphase9resetPoolEP12btDispatcher };

export { zn16btDbvtBroadphase8aabbTestERK9btVector3S2R24btBroadphaseAabbCallback };

export { zn16btDbvtBroadphase11createProxyERK9btVector3S2IPvssP12btDispatcherS3 };

export { zn16btDbvtBroadphase7rayTestERK9btVector3S2R23btBroadphaseRayCallbackS2S2 };

export { zn16btDbvtBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher };

export { zn16btDbvtBroadphase25calculateOverlappingPairsEP12btDispatcher };

export { zn16btDbvtBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4P12btDispatcher, zn16btDbvtBroadphaseD0Ev };

export { zn16btDbvtBroadphaseD1Ev, zn12btDispatcherD0Ev, zn12btDispatcherD1Ev };

export { zn28btHashedOverlappingPairCache23getOverlappingPairArrayEv };

export { zn28btHashedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback };

export { zn28btHashedOverlappingPairCache18hasDeferredRemovalEv };

export { zn28btHashedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback };

export { zn28btHashedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher };

export { zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev };

export { zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev };

export { zzn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair };

export { zzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev };

export { zzn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev };

export { zzn28btHashedOver };

export { zn28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv };

export { znk28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv };

export { znk28btHashedOverlappingPairCache22getNumOverlappingPairsEv };

export { zn28btHashedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher };

export { zn28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher };

export { zn28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher };

export { zn28btHashedOverlappingPairCacheD0Ev, zn28btHashedOverlappingPairCacheD1Ev };

export { zn28btHashedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1 };

export { zn28btHashedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1P12btDispatcher };

export { zn28btHashedOverlappingPairCache8findPairEP17btBroadphaseProxyS1 };

export { zn28btHashedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher };

export { zn28btHashedOverlappingPairCacheC1Ev, znk14btQuantizedBvh31calculateSerializeBufferSizeNewEv };

export { znk14btQuantizedBvh9serializeEPvP12btSerializer, zn14btQuantizedBvhD1Ev, zn14btQuantizedBvhD0Ev };

export { zn6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS8ICollideE };
